Interacting with an IpServer via sockets
| From: | Todd Cary | Date: | Sat, 03 May 2008 00:29:41 +0000 |
| Subject: | Interacting with an IpServer via sockets | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-273824@lists.php.net to get a copy of this message | ||
I have an IpServer using Turbopowers IpServer library) and am able to connect and send data (fwrite() ), however, I cannot receive data from the server. The PutString() in the IpServer executes without error, however the fgets() just hangs.
Any ideas on what I may be doing incorrectly?
$fp = fsockopen("192.168.0.21", "5389");
if ($fp) {
echo "Socket has been opened: " . $fp . " " . date("m/d/y h:n:s", time()) . "<br>";
fwrite($fp, "Please send me a report!");
//echo fgets($fp) . "<br>";
fclose($fp);
} else {
echo "Socket cannot open socket<br>";} Many thanks..... Todd