This is a function I found in the archives.
I suggest you look up the cURL extension in the manual aswell. Far better then this function...
function PostToHost($host, $path, $data_to_send)
{
$fp = fsockopen($host,80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data_to_send);
// Print the page with the values you sent....
//while(!feof($fp))
//{
// echo fgets($fp, 128);
//}
fclose($fp);
}
PostToHost("domain.com","/path/page.htm","name=myname");
// Tobias Talltorp