PHP Network Functions

EditRocket provides the following information on Network functions in the PHP source code builder.

int checkdnsrr ( string $host [, string $type ] ) - Searches DNS for records of type type corresponding to host.

bool closelog ( void ) - closelog() closes the descriptor being used to write to the system logger. The use of closelog() is optional.

int debugger_off ( void ) - Disable internal PHP debugger.

int debugger_on ( string $address ) - Enables the internal PHP debugger, connecting it to address.

void define_syslog_variables ( void ) - Initializes all constants used in the syslog functions.

-

-

array dns_get_record ( string $hostname [, int $type [, array &$authns ]], array &$addtl ) - Fetch DNS Resource Records associated with the given hostname.

resource fsockopen ( string $hostname [, int $port [, int &$errno [, string &$errstr [, float $timeout ]]]] ) - Initiates a socket connection to the resource specified by hostname.

string gethostbyaddr ( string $ip_address ) - Returns the host name of the Internet host specified by ip_address.

string gethostbyname ( string $hostname ) - Returns the IP address of the Internet host specified by hostname.

array gethostbynamel ( string $hostname ) - Returns a list of IP addresses to which the Internet host specified by hostname resolves.

bool getmxrr ( string $hostname , array &$mxhosts [, array &$weight ] ) - Searches DNS for MX records corresponding to hostname.

int getprotobyname ( string $name ) - getprotobyname() returns the protocol number associated with the protocol name as per /etc/protocols.

string getprotobynumber ( int $number ) - getprotobynumber() returns the protocol name associated with protocol number as per /etc/protocols.

int getservbyname ( string $service , string $protocol ) - getservbyname() returns the Internet port which corresponds to service for the specified protocol as per /etc/services.

string getservbyport ( int $port , string $protocol ) - getservbyport() returns the Internet service associated with port for the specified protocol as per /etc/services.

void header ( string $string [, bool $replace [, int $http_response_code ]] ) -

array headers_list ( void ) - headers_list() will return a list of headers to be sent to the browser / client.

bool headers_sent ([ string &$file [, int &$line ]] ) - Checks if or where headers have been sent.

string inet_ntop ( string $in_addr ) -

string inet_pton ( string $address ) - This function converts a human readable IPv4 or IPv6 address (if PHP was built with IPv6 support enabled) into an address family appropriate 32bit or 128bit binary structure.

int ip2long ( string $ip_address ) - The function ip2long() generates an IPv4 Internet network address from its Internet standard format (dotted string) representation.

string long2ip ( int $proper_address ) - The function long2ip() generates an Internet address in dotted format (i.e.: aaa.bbb.ccc.ddd) from the proper address representation.

bool openlog ( string $ident , int $option , int $facility ) - openlog() opens a connection to the system logger for a program.

resource pfsockopen ( string $hostname [, int $port [, int &$errno [, string &$errstr [, float $timeout ]]]] ) -

bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly ]]]]]] ) - setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including and tags as well as any whitespace.

bool setrawcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly ]]]]]] ) -

-

-

-

bool syslog ( int $priority , string $message ) - syslog() generates a log message that will be distributed by the system logger.