Syntax:gethostbyaddr($ip_address);
Parameter:this function takes one parameter as above and described below:
- $ip_address : Required. Specifies the IP address whose hostname you want to find. Passed as a string.
Return value: - This function returns the hostname on success and the IP address on error.
Notes : - This function is available for PHP 4.0.0 and above.
example $host
=
gethostbyaddr
(
"52.25.109.230"
);
echo
$host
;
?>
Output:ec2-52-25-109-230.us-west-2.compute.amazonaws.com
Link: https://www.php.net/manual/en/function.gethostbyaddr.php