I've included the following code in a web page:
// determine users ip address
$remoteHost = gethostbyaddr($REMOTE_ADDR);
if ($remoteHost) { $IP = "$remoteHost / $REMOTE_ADDR"; } else { $IP = $REMOTE_ADDR; }
If I add an echo "$IP" statement, it displays "localhost/127.0.0.1" regardless of the machine's actual address.
I'm hosting this page on a server that is configured for PHP-- the rest of my scripts adding info to a mySQL database work perfectly.
I've tested this in MSIE and Netscape on both PCs and Macs, and still get the same @#$! IP address.
What have I done wrong?