note 59934 added to function.getenv
| From: | (at]gmx{dot) | Date: | Tue, 20 Dec 2005 16:35:46 +0000 |
| Subject: | note 59934 added to function.getenv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100475@lists.php.net to get a copy of this message | ||
I've read all the comments here.
Most of you trust that HTTP_X_FORWARDED_FOR is the real ip address of the user.
But it can easily be faked by sending a wrong HTTP request.
REMOTE_ADDR does contain the 'real' ip address (maybe of the proxy server but it cannot be
faked as easy as X_FORWARDED_FOR)
So if you rely on checking the visitor by it's ip address validate _both_
$_SERVER['REMOTE_ADDR'] and $_SERVER['HTTP_X_FORWARDED_FOR'].
----
Manual Page -- http://www.php.net/manual/en/function.getenv.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59934
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59934&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59934&report=yes
Search -- http://master.php.net/manage/user-notes.php