Re: Problem with REMOTE_ADDR

From: Date: Mon, 16 Sep 2002 22:54:16 +0000
Subject: Re: Problem with REMOTE_ADDR
Groups: php.general 
Request: Send a blank email to php-general+get-116575@lists.php.net to get a copy of this message
Yep, my IP address appears fine through other servers. It makes me think that there is a possible misconfiguration with PHP or the server. Thanks, Chris
From: Leif K-Brooks <eurleif@buyer-brokerage.com> To: Chris Cook <cjc1800@hotmail.com> CC: php-general@lists.php.net Subject: Re: [PHP] Problem with REMOTE_ADDR Date: Mon, 16 Sep 2002 18:27:19 -0400 Have you tried a web site such as www.getmyipaddress.com to see if it's on your end or your script's? Chris Cook wrote:
Hello all, Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of course, I am not interested in this and want the IP of the client. I put this code in to resolve it and it still didnt work. What am I doing wrong? Thanks for any help in advance, Chris if (getenv(HTTP_X_FORWARDED_FOR)) { $ip = getenv('HTTP_X_FORWARD_FOR'); $host = gethostbyaddr($ip); } else { $ip = getenv('REMOTE_ADDR'); $host = gethostbyaddr($ip); } _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

« previous php.general (#116575) next »