Forum Moderators: coopster
Best way is to study the output of phpinfo() on your server and check which global variable holds the remote IP address.
It is probably:
$_SERVER["REMOTE_ADDR"]
so your code would be:
echo("Your IP ".$_SERVER["REMOTE_ADDR"]." has been logged.");