użyłem tej funkcji:
<?php
function doPost($uri,$postdata,$host){
if (!$da) {
echo "$errstr ($errno)<br/>n"; }
else {
$salida ="POST $uri HTTP/1.1rn";
$salida.="Host: $hostrn";
$salida.="User-Agent: php Scriptrn";
$salida.="Content-Type: application/x-www-form-urlencodedrn";
$salida.="Content-Length: ".strlen($postdata)."rn"; $salida.="Connection: closernrn";
$salida.=$postdata;
$response.=fgets($da, 128
); $response=split("rnrn",$response); $header=$response[0];
$responsecontent=$response[1];
if(!(strpos($header,"Transfer-Encoding: chunked")===false)){ $aux=split("rn",$responsecontent); for($i=0;$i<count($aux);$i++)
if($i==0 || ($i%2==0))
$aux[$i]="";
}//if
return chop($responsecontent); }//else
}//function-doPost
?>
W taki sposób:
<?php
if($temp_database)
{
$temp_database['url'] = "http://localhost/moja_strona/plik.php"; // to dostaję z bazy danych
$temp = substr($temp_database['url'], 7
); $host = $temp_arr[0];
$temp_arr[0] = "";
$postdata = "";
echo doPost
($temp, "", $host); }
?>
I dostałem na dzień dobry stronę z Internal Server Error... po czym jeszcze powtórzoną kilkadziesiąt razy poprawną stronę odbiorcy... co robię nie tak?