Open persistent Internet or Unix domain socket connection
pfsockopen ( string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout") ]]]] ) : resource
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.
The port number. This can be omitted and skipped with -1 for transports that do not use ports, such as unix://.
If provided, holds the system level error number that occurred in the system-level connect() call. If the value returned in errno 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.
The error message as a string.
The connection timeout, in seconds. Note: If you need to set a timeout for reading/writing data over the socket, use stream_set_timeout(), as the timeout parameter to fsockopen() only applies while connecting the socket.
HTTP/1.1 301 Moved Permanently
Date: Thu, 21 Jan 2021 15:52:08 GMT
<head><title>301 Moved Permanently</title></head>
<center><h1>301 Moved Permanently</h1></center>