IP Address

Your publicly visible IP address is: [PHP]
$ip = htmlspecialchars($_SERVER[‘REMOTE_ADDR’]);
echo “[code]$ip[/code]”;
$hostname = gethostbyaddr($_SERVER[‘REMOTE_ADDR’]);

if ($hostname !== false && $hostname != $ip) {
$hostname = htmlspecialchars($hostname);
echo “[br]\nThis resolves to: [code]$hostname[/code]”;
}
[/PHP]

Leave a Reply

All comments are moderated. Comments must be in english and related to post.