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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php