We now have a youtube channel. Subscribe!

PHP | Network Functions

PHP Network Functions


Hello folks! welcome back to a new edition of our tutorial on PHP. In this tutorial guide, we are going to be studying about the PHP Network Functions.

The PHP network functions allows you to access the internet into PHP.

Installation

There is no Installation needed to use these functions; they are part of the PHP core.


List of Network Functions

The following below is the list of network functions supported in PHP. PHP - indicates the earliest versions of PHP that have support for the functions.

Sr.NoFunction & DescriptionPHP
1checkdnsrr

It checks the DNS record of corresponding the host or ip address.

4
2closelog

It closing the connection of system logger

4
3define_syslog_variables

Initializes the syslog variable

4
4fsockopen

It is used to open internet or Unix domain socket connections

4
5gethostbyaddr

It returns the error code from the last connection

5
6gethostbyname

It is used to get the internet host name which has given by IP Address.

4
7gethostbynamel

It is used to get a list of the IPV4 addresses which has given by Host name

4
8gethostname

It is used to get the host name

4
9getmxrr

It is used to get the MX records to Host

4
10getprotobyname

It is used to get Protocal number which has associated with protocal name

4
11getprotobynumber

It is used to fetchs all result rows and returns the result set as an associative array

4
12getservbyname

It is used to get Protocal name which has associated with protocal number

4
13getservbyport

It is used to get internet services which has corresponding to port number.

4
14header_register_callback

It will register the function that will be called when PHP start sending output.

4
15header_remove

It is used to remove previously set headers

4
16header

It is used to send the row of HTTP Headers.

4
17headers_list

It is used to returns a list of repose headers sent

4
18headers_sent

It will check whether header have been sent or not.

4
19http_response_code.

It used to get or set the HTTP Response.

4
20inet_ntop

It used to convert internet package to human readable formate.

4
21inet_pton

It used to convert human readable Ip address to in_addr format.

4
22ip2long

It used to convert ipv4 address to long integer.

4
23long2ip

It used to convert long integer value to Ipv4 address.

4
24openlog

It used to open connection to system logger.

4
25pfsockopen

It used to open internet or unix domain socket.

4
26setcookie

It used to set the cookies.

4
27setrawcookie

It used to set the cookies.

4
28socket_set_blocking

It is an alias of stream_set_blocking(), It has block or unblock options for stram mode.

4

In our subsequent tutorials, we are going to be discussing about the above listed PHP network functions.


Alright guys! This is where we are going to be rounding up for this tutorial post. In our next tutorial, we are going to be discussing about PHP closelog() Function.

Do feel free to ask your questions where necessary and we will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain