Page 1 of 1

sockets strings and fgets

Posted: Tue Feb 25, 2003 12:12 am
by Guy
I'm using

Code: Select all

fgets($fp,256)
to get a string from a socket i opened before.
teh socket is sending a string of the length of 256 which from the end point of the actual data is filled with'\0'( end of string).
the problem is that the fgets never finish reading the string and get timed out.
how can i solve this (i want to get 256 chars but be able to get '\0' in them)
can it be done?
Guy

Posted: Tue Feb 25, 2003 5:26 am
by volka