note 56173 added to function.getenv
| From: | shaneat007Marketing at osu1 dot php dot net | Date: | Thu, 25 Aug 2005 22:42:54 +0000 |
| Subject: | note 56173 added to function.getenv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94195@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.getenv.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56173
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56173&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56173&report=yes
Search -- http://master.php.net/manage/user-notes.php