English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

PHP Reference Manual

PHP HTTP network functions

PHP network functions allow you to access the Internet through PHP

Installation

These features can be used without installation. They are part of the PHP core.

Function list

Version-Indicates the earliest version of PHP that supports this function.

NumberFunctionDescription
Version
1checkdnsrr()It checks the DNS records of the corresponding host or IP address.4
2closelog()Close the connection of the system logger4
3define_syslog_variables()Initialize the syslog variables4
4fsockopen()It is used to open an Internet or Unix domain socket connection4
5gethostbyaddr()It returns the error code from the last connection5
6gethostbyname()It is used to get the Internet hostname specified by the IP address.4
7gethostbynamel()It is used to get the IPV by the specified hostname4Address list4
8gethostname()Used to get the hostname4
9getmxrr()Used to send MX records to the host4
10getprotobyname()Used to get the protocol number associated with the protocol name4
11getprotobynumber()It is used to get all result lines and return the result set as an associative array4
12getservbyname()Used to get the protocol name associated with the protocol number4
13getservbyport()It is used to get the Internet service corresponding to the port number.4
14header_register_callback()It registers a function to be called when PHP starts sending output.4
15header_remove()It is used to delete previously set headers.4
16header()It is used to send HTTP header lines.4
17headers_list()It is used to return a list of sent Repose headers4
18headers_sent()It checks if headers have been sent.4
19http_response_code()

It is used to get or set HTTP responses.

4
20inet_ntop()It is used to convert internet packets to a human-readable format.
4
21inet_pton()It is used to convert a human-readable IP address to in_addr format.4
22ip2long()It is used to convert ipv4Convert an address to a long integer.4
23long2ip()It is used to convert a long integer value to an IPv4Address.4
24openlog()It is used to open a connection with the system logger.4
25pfsockopen()It is used to open Internet or Unix domain sockets.4
26setcookie()It was once used to set cookies.4
27setrawcookie()It was once used to set cookies.4
28socket_set_blocking()It is an alias of stream_set_blocking(), which has the block or unblock options in stream mode.4