Current Location: Home> Function Categories> gethostbyaddr

gethostbyaddr

Get the host name corresponding to the specified IP address
Name:gethostbyaddr
Category:Network
Programming Language:php
One-line Description:Returns the domain name of the given IP address.

Definition and usage

gethostbyaddr() function returns the domain name of the given IP address.

Example

A simple gethostbyaddr() example:

 <?php
$host = gethostbyaddr ( $_SERVER [ "REMOTE_ADDR" ] ) ;
echo $host ;
?>

grammar

 gethostbyaddr ( ipaddress )

Parameter value

parameter describe
ipaddress Required. Specify the IP address.
Similar Functions
Popular Articles