Name

fsockopen

Synopsis

$fd = fsockopen($hostname,$port);

Opens a connection with hostname on port port and returns a file descriptor associated with the open connection. If the port number is 0, the hostname will be considered the filename of a Unix-style socket file on the local host. In the case of an error, the function returns the following: -3 if the socket could not be created, -4 if the hostname could not be resolved, -5 if the connection was refused or timed out, -6 if the fdopen() call failed, or -7 if the setvbuf() call failed.

Get MySQL and mSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.