fsockopen example corrected according to RFC2616

as requested in bug report #6080


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@30091 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2000-08-11 10:47:19 +00:00
parent c85e008ab0
commit bdb8df613f

View file

@ -182,7 +182,7 @@ $fp = fsockopen ("www.php.net", 80, &$errno, &$errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\n\n");
fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
while (!feof($fp)) {
echo fgets ($fp,128);
}