Glossary Term
fsockopen()
fsockopen() — Open Internet or Unix domain socket connection.
fsockopen() — Initiates a socket connection to the resource specified by hostname.
The socket will by default be opened in blocking mode. You can switch it to non-blocking mode by using stream_set_blocking.
The function stream_socket_client is similar but provides a richer set of options, including non-blocking connection and the ability to provide a stream context.
Inputs: hostname: If OpenSSL support is installed, you may prefix the hostname with either ssl:// or tls:// to use an SSL or TLS client connection over TCP/IP to connect to the remote host. port: The port number. This can be omitted and skipped with -1 for transports that do not use ports, such as unix://. error_code: If provided, holds the system level error number that occurred in the system-level connect() call. If the value returned in error_code is 0 and the function returned false, it is an indication that the error occurred before the connect() call. This is most likely due to a problem initializing the socket. error_message: The error message as a string.
Returns: fsockopen returns a file pointer which may be used together with the other file functions (such as fgets, fgetss, fwrite, fclose, and feof). If the call fails, it will return false
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
