|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-21 04:43 UTC] sas at cvs dot php dot net
[1999-10-04 17:27 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 23:00:01 2026 UTC |
I've written a script to implement HTTP/1.0 connection to web servers. Like this: $fp=fsockopen("localhost",80); if($fp){ fputs($fp,"GET / HTTP/1.0\r\n\r\n"); $i=0; while(!feof($fp)){ $i++; $temp=fgets($fp,128); //$temp=fgetc($fp); echo "$i-----<br>$temp<br>-----<br>"; $response.=$temp; } } After I upgrade to 3.0.11, I found this script fall into endless loop. I track execution of the script and found that fgets get nothing after the HTTP header of the response. If I change fgets() to fgetc(), there will be no problem. Please check out the problem. Thanks. regards, Zili Zhang