Best way to get the remote IP address?
| From: | Alan McFarlane | Date: | Mon, 21 Jan 2002 19:08:02 +0000 |
| Subject: | Best way to get the remote IP address? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81414@lists.php.net to get a copy of this message | ||
I'm trying to get the remote IP address of a user in a (PHP) version and
server-software independant way, but am having a few problems.
Obviously, I've seen $HTTP_SERVER_VARS['REMOTE_ADDR'], but Ive also seen
references to $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'].
Is there any generic solution to this problem (and if so, what is it?)
Cheers
--
Alan McFarlane
amcfarlane@bigfoot.com
ICQ: 20787656