Determining the Hostname of a Remote IP
<?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); if($hostname === $_SERVER['REMOTE_ADDR']) { echo "The host name could not be resolved.<BR/>\n"; } else { echo "The host name is: $hostname<BR/>\n"; } ?>