note 56173 deleted from function.getenv by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 00:19:21 +0000 |
| Subject: | note 56173 deleted from function.getenv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-141832@lists.php.net to get a copy of this message | ||
Note Submitter: shane at 007Marketing
----
I am just starting to try to tackle this issue of getting the real ip address.
One flaw I see in the preceding notes is that none will bring up a true live ip address when the
first proxy is behind a nat router/firewall.
I am about to try and nut this out but from the data I see so far the true ip address (live ip of
the nat router) is included in $_SERVER['HTTP_CACHE_CONTROL'] as bypass-client=xx.xx.xx.xx
$_SERVER['HTTP_X_FORWARDED_FOR'] contains the proxy behind the nat router.
$_SERVER['REMOTE_ADDR'] is the isp proxy (from what I read this can be a list of proxies
if you go through more than one)
I am not sure if bypass-client holds true when you get routed through several proxies along the way.