If you have an IP address then sometimes it will be useful to try to resolve the host domain name for that particular IP address.
There is a built in function that accepts the IP address and will find the host name.
In order to do this, code like the below will help:
<?php
$ip = $REMOTE_ADDR;//capture IP
$domain = GetHostByName($ip);
?>