aqui el codigo
Código PHP:
$host="www.misitio.com";
$referer="http://google.com";
$uri="/mipagina.php";
$vars="&to=mivar";
$header = "Host: $host\r\n";
$header .= "User-Agent: Mosaic\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header.="Referer: $referer\r\n";
$header .= "Content-Length: ".strlen($vars)."\r\n";
$header.="Pragma: no-cache\r\n";
$header .= "Connection: close\r\n\r\n";
$fp = pfsockopen("tcp://".$host, 80, $errno, $errstr, 20);
fputs($fp, "POST $uri HTTP/1.1\r\n");
fputs($fp, $header.$vars);
while (!feof($fp)){
echo fgets($fp, 128)."<br>";
}
fclose($fp);
saludos