The Joomla module that shows web visitors their external IP address is called mod_whatismyip. This module uses a small PHP script named mod_whatismyip.php.
We found this script, unmodified, often yields incorrect results from clients behind NAT. It includes extra logic that maybe removed to improve results.
Try editing the file mod_whatismyip.php (mod_j15whatismyip.php in Joomla 1.5) after making a backup copy, of course.
Change:
$ip;
if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
else $ip = "UNKNOWN";
to:
$ip = "UNKNOWN";
if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR");
| < Prev | Next > |
|---|





