Menu Home

gethostbyaddr

osbo.com | PHP | Functions | gethostbyaddr

Get the Internet host name corresponding to a given IP address

Syntax

gethostbyaddr ( string $ip_address ) : string

Parameters

ip_address

The host IP address.

Return

Returns the host name on success, the unmodified ip_address on failure, or FALSE on malformed input.

Examples

<?

$ip_address = '185.85.0.29';

$return = gethostbyaddr($ip_address);

echo $return;

?>
ip-185-85-0-29.ax5z.com

PHP