|
socket_recvReceives data from a connected socket Description
int socket_recv
( resource
$socket
, string &$buf
, int $len
, int $flags
)
The socket_recv function receives
Parameters
Return Values
socket_recv returns the number of bytes received,
or Examples
Example #1 socket_recv example This example is a simple rewrite of the first example from Examples to use socket_recv.
<?php The above example will produce something like: <h2>TCP/IP Connection</h2> OK. Attempting to connect to '208.77.188.166' on port '80'...OK. Sending HTTP HEAD request...OK. Reading response: Read 123 bytes from socket_recv(). Closing socket...HTTP/1.1 200 OK Date: Mon, 14 Sep 2009 08:56:36 GMT Server: Apache/2.2.3 (Red Hat) Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT ETag: "b80f4-1b6-80bfd280" Accept-Ranges: bytes Content-Length: 438 Connection: close Content-Type: text/html; charset=UTF-8 OK. |