Re: [Re: [PHP] user's ip]

From: Date: Fri, 10 Aug 2001 11:58:02 +0000
Subject: Re: [Re: [PHP] user's ip]
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62163@lists.php.net to get a copy of this message
On 7 Aug 01, at 14:02, René Moonen wrote: > The problem is that REMOTE_ADDR returns the IP address of the proxy (if > if(getenv(HTTP_X_FORWARDED_FOR)) > { > $ip=getenv(HTTP_X_FORWARDED_FOR); > } > else > { > $ip=getenv(REMOTE_ADDR); > } > $host = gethostbyaddr($ip); except, perhaps, when there's also a firewall with NAT/MASQ involved - in that case you'll probably not get much closer than the firewall's IP address (at least, that's how it is on my network). CYA, Dave ----------------------------------------------------------------------- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:dfreeman@outbackqld.net.au -----------------------------------------------------------------------

« previous php.general (#62163) next »