socket_read() hangs with FTP
| From: | Serge | Date: | Thu, 04 Oct 2007 14:43:36 +0000 |
| Subject: | socket_read() hangs with FTP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-262751@lists.php.net to get a copy of this message | ||
Hello. I'm tried an example from PHP manual with simple TCP/IP Client. I'm create a socket to FTP server, then read data from socket
[PHP]
while ($out = socket_read($socket, 2048)) {
echo $out;
}
[/PHP]
when all data are read, socket_read() don't return an empty string, it's hangs.
Can you tell me, how to write work with it? Thank you.