(PHP 4 >= 4.0.2)

read -- Read from a socket


int read (int socket_des, string &buffer, int length)

The function read() reads from socket socket_descreated by the accept_connect() function into &buffer the number of bytes set by length. Otherwise you can use \n, \t or \0 to end reading. Returns number of bytes that have been read.

See also accept_connect(), bind(), connect(), listen(), strerror(), socket_get_status(). and write().