The environment variable $REMOTE_ADDR is where the users IP address is stored. if you want to resolve the domain name for that IP you can use this code.


$domain = GetHostByName($REMOTE_ADDR);