async function makePOSTRequest(url, parameters) { try { const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: parameters }); if (!response.ok) { throw new Error('Network response was not ok'); } const result = await response.text(); document.getElementById('myspan').innerHTML = result; } catch (error) { alert('There was a problem with the request: ' + error.message); } } async function sharemakePOSTRequest(url, parameters) { try { const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: parameters }); if (!response.ok) { throw new Error('Network response was not ok'); } const result = await response.text(); document.getElementById('sharespan').innerHTML = result; } catch (error) { alert('There was a problem with the request: ' + error.message); } } function get() { const poststr = `id=${597302}&comment=${encodeURIComponent(document.getElementById('comment').value)}&captcha=${encodeURIComponent(document.getElementById('captcha').value)}`; makePOSTRequest('https://www.homemoviestube.com/includes/inc.post_comment.php', poststr); } function shareget() { const poststr = `id=${597302}&name=${encodeURIComponent(document.getElementById('share_name').value)}&to=${encodeURIComponent(document.getElementById('share_to').value)}&msg=${encodeURIComponent(document.getElementById('share_msg').value)}`; sharemakePOSTRequest('https://www.homemoviestube.com/includes/post_share.php', poststr); }