Sockets

From: Date: Thu, 28 Feb 2002 19:15:08 +0000
Subject: Sockets
Groups: php.general 
Request: Send a blank email to php-general+get-86651@lists.php.net to get a copy of this message
Hello i am trying to write a php script to monitor some tcp services running on our network. i use fsockopen to open it. I use this code to get all the data off the port in one block. while(!feof($sock)){ $indata.=fgets($sock,256); } the code is roughly like this connect read all data off port send a command read all data off port close my problem is that feof($sock) once it evaluates to true (once it is done reading all the data the first time) that when new data arrives (after the send) feof($sock) is still true signifing no more data. Any one know a workaround or mabey what im doing wrong. full code is available at http://dcl.nvps.net/socket.phps Thanks for anyhelp you might be able to give. -Karl

« previous php.general (#86651) next »