fsockopen - 3.0.16 vs 4.x

From: Date: Tue, 28 Nov 2000 00:34:36 +0000
Subject: fsockopen - 3.0.16 vs 4.x
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27520@lists.php.net to get a copy of this message
Ive tried to post some data to an URL. Lokal (apache, 3.0.16) it worked, on a server (?, 4.x) not, what can be the problem? $fp = fsockopen ("www.domain.com", 80, &$errno, &$errstr, 30); $post = "action=send&test=17"; $data = "POST /dir/script.php3 HTTP/1.0\r\n"; $data .= "Accept: */*\r\n"; $data .= "Content-Type: application/x-www-form-urlencoded\r\n"; $data .= "Content-Length: ".strlen($post)."\r\n"; $data .= "Connection: Keep-Alive\r\n"; $data .= "Cookie: C_sms=".$key[$keynum]."\r\n\r\n"; $data .= $post." "; if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, $data); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); }

« previous php.general (#27520) next »