Jump to content

What have I done wrong? (fsockopen)


johnsmith153

Recommended Posts


$destination="www.name.com/folder/file.php";

$addtourl="name=".$_POST['n']."&email=".$_POST['e']."&phone=".$_POST['p']."&terms_conditions=1&x=".$x."&y=".$y.$extra;
$destination.="?".$addtourl;


$fp = fsockopen("www.name.com",80);

$out = "POST / HTTP/1.1\r\n";
$out .= "Host: $destination\r\n";
$out .= "Content-Type: application/x-www-form-urlencoded\n". 
$out .= "Content-Length: ".strlen($destination)."\n\n". 
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);

fclose($fp);


Link to comment
https://forums.phpfreaks.com/topic/125474-what-have-i-done-wrong-fsockopen/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.