Im having trouble using feof() while reading from a socket. Here is the code:
$mySocket = fsockopen("Stuart", "17789"); fwrite($mySocket, $command);
while(!feof($mySocket)){ echo fgets ($mySocket, 128); }
Any reason as to why this wont work?
There is no FEOF on sockets. Socketfiles end when the connection is closed.
Did you examine the manual's socket examples?