GETHOSTBYADDR(3) 1 GETHOSTBYADDR(3)
gethostbyaddr - Get the Internet host name corresponding to a given IP address
SYNOPSIS
string gethostbyaddr (string $ip_address)
DESCRIPTION
Returns the host name of the Internet host specified by $ip_address.
PARAMETERS
o $ip_address
- The host IP address.
RETURN VALUES
Returns the host name on success, the unmodified $ip_address on failure, or FALSE on malformed input.
EXAMPLES
Example #1
A simple gethostbyaddr(3) example
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;
?>
SEE ALSO
gethostbyname(3), gethostbynamel(3).
PHP Documentation Group GETHOSTBYADDR(3)