6
Burnzy, many thanks for the enquiry form, but I found it didn't correctly return the IP address dynamically allocated to my router by our ISP. I tracked down a similar script (onlyip) and replaced this part:
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
with this from the onlyip script:
if (getenv('HTTP_X_FORWARDED_FOR')){$ipi=getenv('HTTP_X_FORWARDED_FOR');} else {$ipi=getenv('REMOTE_ADDR');}
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
and it now returns my router IP correctly.
I confess I am a little confused as the dynamic address for the router is correctly identified by
http://www.checkip.dyndns.org and
http://www.showmyip.com, but I get a completely different result from the original form script and
http://www.whatismyip.com.
Would welcome anyone's greater wisdom on this, as I don't want to bar the wrong IP addresses.