Gen. partnerAlgotech

PHP function fsockopen()

Open Internet or Unix domain socket connection

|
September 11, 2019

Availability in PHP 4.0

Open Internet or Unix domain socket connection

Parameters

Parameter Data type Default value Note
$hostname string not If you have compiled in OpenSSL support, 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 int null, The port number.
$errno int null, If provided, holds the system level error number that occurred in the system-level connect() call.
$errstr string null,
$timeout float null

Return values

resource

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

Other resources

Official fsockopen documentation

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.