sockets strings and fgets
Posted: Tue Feb 25, 2003 12:12 am
I'm using 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
Code: Select all
fgets($fp,256)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