|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-21 07:27 UTC] stas@php.net
[2000-12-30 19:56 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
I have the following problem: $fp =fsockopen($server, 8611, &$errno, &$errstr); while(feof($fp)!=true) { echo "X"; # for debuging flush(); # for debuging fflush($fp); # for debuging $str.=fgetc($fp); # or fgets($fp,2); or fread($fp,1); echo "Y"; # for debuging flush(); # for debuging fflush($fp); # for debuging } # while Would produce "XYXYXYXYXYXYX" When the received data looks like "%00%0A%00%00%00%00%00%00" in HEX. That means at the last character which is a NULL-byte the fgetc or fgets or fread would hang! BUT fread($fp,8); works! But I need it for variable length as well! Thanks for the help