note 90606 added to function.socket-read

From: Date: Thu, 30 Apr 2009 04:30:16 +0000
Subject: note 90606 added to function.socket-read
Groups: php.notes 
Request: Send a blank email to php-notes+get-154035@lists.php.net to get a copy of this message
Here is a quick example of how to use socket_read to receive data until the connection is terminated. I've found this useful when I need to manually retrieve replies to XML-RPC queries. $reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != ""); echo($reply); ---- Server IP: 64.71.164.2 Probable Submitter: 66.33.195.240 ---- Manual Page -- http://www.php.net/manual/en/function.socket-read.php Edit -- https://master.php.net/note/edit/90606 Del: integrated -- https://master.php.net/note/delete/90606/integrated Del: useless -- https://master.php.net/note/delete/90606/useless Del: bad code -- https://master.php.net/note/delete/90606/bad+code Del: spam -- https://master.php.net/note/delete/90606/spam Del: non-english -- https://master.php.net/note/delete/90606/non-english Del: in docs -- https://master.php.net/note/delete/90606/in+docs Del: other reasons-- https://master.php.net/note/delete/90606 Reject -- https://master.php.net/note/reject/90606 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#154035) next »