Re: [PHP] $REMOTE_ADDR error
check the httpd's X_FORWARDED_FOR var using getenv or similiar... Quoting Christian Dechery (Wed, Jun 27, 2001 at 09:01:28AM -0300) yeah... that's a possibility... so there's no way I can see the user'ss IP? At 09:42 27/6/2001 +0100, Colin May wrote: Almost as if the request was proxied or redirected from the local machine (127.0.0.1 is the local loop back ip) Quoting Christian Dechery (Tue, Jun 26, 2001 at 10:31:54PM -0300) why do $REMOTE_ADDR always returns 127.0.0.1 no matter the user's IP who is seeing the page? this doesn't look 'remote' to me... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Colin May - mailto:[EMAIL PROTECTED] - http://www.wibble.org.uk I've got a sand storm blowing in my head seeing many colours but the only one coming through is red - Sandstorm, All Change, Cast . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- Colin May - mailto:[EMAIL PROTECTED] - http://www.wibble.org.uk I've got a sand storm blowing in my head seeing many colours but the only one coming through is red - Sandstorm, All Change, Cast -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] $REMOTE_ADDR error
why do $REMOTE_ADDR always returns 127.0.0.1 no matter the user's IP who is seeing the page? this doesn't look 'remote' to me... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $REMOTE_ADDR error
why do $REMOTE_ADDR always returns 127.0.0.1 no matter the user's IP who is seeing the page? this doesn't look 'remote' to me... Maybe your web-server is not configured to give you REMOTE_ADDR. PHP pretty much just passes on whatever the web-server hands it. If you don't like what you are getting, it's in your web-server configuration, and not actually in PHP... Also, if your web-server is on your machine, well, you always are 127.0.0.1 when you surf... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] $REMOTE_ADDR error
Have a look in phpinfo. You'll find the desired value there. The reason is indeed proxying. or try something like this : if ($HTTP_SERVER_VARS[HTTP_X_FORWARDED_FOR] != ) $ip = $HTTP_SERVER_VARS[HTTP_X_FORWARDED_FOR]; $proxy = $HTTP_SERVER_VARS[REMOTE_ADDR]; $host = @gethostbyaddr($HTTP_SERVER_VARS[HTTP_X_FORWARDED_FOR]); } else $ip = $HTTP_SERVER_VARS[REMOTE_ADDR]; $host = @gethostbyaddr($HTTP_SERVER_VARS[REMOTE_ADDR]); } Brave Cobra - Original Message - From: Colin May [EMAIL PROTECTED] To: Christian Dechery [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 10:42 AM Subject: Re: [PHP] $REMOTE_ADDR error Almost as if the request was proxied or redirected from the local machine (127.0.0.1 is the local loop back ip) Quoting Christian Dechery (Tue, Jun 26, 2001 at 10:31:54PM -0300) why do $REMOTE_ADDR always returns 127.0.0.1 no matter the user's IP who is seeing the page? this doesn't look 'remote' to me... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Colin May - mailto:[EMAIL PROTECTED] - http://www.wibble.org.uk I've got a sand storm blowing in my head seeing many colours but the only one coming through is red - Sandstorm, All Change, Cast -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]