• PHP Video Tutorials

PHP - Function gethostbyaddr



Syntax

string gethostbyaddr ( string $ip_address )

Definition and Usage

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

Return Values

It returns Internet host name

Parameters

Sr.No Parameters & Description
1

ip_address

It will host the IP Address

Example

Try out following example

<?php
   $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
   
   echo $hostname;
?>

Above Example returns the result of host name

php_function_reference.htm
Advertisements