|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-08-23 06:06 UTC] stas@php.net
[2000-08-23 06:06 UTC] stas@php.net
[2000-09-21 10:46 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 11 05:00:01 2026 UTC |
I?m making a gameserver report script. The problem is when i try to read the reply from the filepointer. <?php $charstoread=500; $fp = pfsockopen("udp://localhost", 27960, &$errno, &$errstr, 10); if(!$fp) { echo "$errstr ($errno)<br>\n"; } else fputs($fp,"\xff\xff\xff\xffgetstatus"); echo fread($fp, $charstoread); fclose($fp); ?> Since i don?t know how many char?s i have to read I use fread, because it should stop when it reaches EOF, but it doesn?t stop. PHP3 freezes, or enter an infinite loop, maybee because it?s unable to find EOF ???.