note 52582 added to function.socket-recv

From: Date: Fri, 06 May 2005 11:59:52 +0000
Subject: note 52582 added to function.socket-recv
Groups: php.notes 
Request: Send a blank email to php-notes+get-88997@lists.php.net to get a copy of this message
My last post was incorrect. The int flag set to 2 apparently reset the file position pointer so what I was reading was the first record repeatedly. My workaroud ended up being the following: for($ct=1; $ct<=$numrecs; $ct++) { $rec = ""; $nr=socket_recv($fp,$rec,76,0); //grab the extra bytes. $terminator = ""; while ($terminator != ".") { $nr=socket_recv($fp,$terminator,1,0); } $custarray[]=substr($rec,0,76); } Martin K. ---- Manual Page -- http://www.php.net/manual/en/function.socket-recv.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52582 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52582&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52582&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52582&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52582&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52582&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52582&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88997) next »