note 21455 added to function.fread

From: Date: Tue, 14 May 2002 01:08:52 +0000
Subject: note 21455 added to function.fread
Groups: php.notes 
Request: Send a blank email to php-notes+get-30606@lists.php.net to get a copy of this message
I tried to write PHP code interacting with Windows-based application. function send_recv($ip, $port, $timeout, $QUERY) { $fp = fsockopen($ip, $port, $errno, $errstr, $timeout); if (!$fp) return NULL; fputs($fp, $QUERY); $REPLY = fread($fp, 128); while (!feof($fp)) { $REPLY. = fread($fp, 128); } fclose($fp); return $REPLY; } My problem is that the above code is blocked in fread(). Of course, I tried to use fgets(), fpassthru(), etc. But nothing was different. What's wrong? Plz, help me. . -- http://www.php.net/manual/en/function.fread.php http://master.php.net/manage/user-notes.php?action=edit+21455 http://master.php.net/manage/user-notes.php?action=delete+21455 http://master.php.net/manage/user-notes.php?action=reject+21455

« previous php.notes (#30606) next »