HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Network Reference : pfsockopen() example
The pfsockopen() function opens a persistent Internet or Unix domain socket connection.
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "W3C"). ssl:// or tls:// works over TCP/IP to connect to the remote host |
port | Optional. Specifies the port number. Use -1 for transports that do not use ports, like unix:// |
errno | Optional. Specifies the system level error number |
errstr | Optional. Specifies the error message as a string |
timeout | Optional. Specifies the connection timeout (in seconds) |
Return Value: | A file pointer that can be used with other file functions (such as fgets(), fwrite(), fclose()). FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
❮ PHP Network Reference