Re: getting the "right" REMOTE_ADDR
| From: | Steven Walker | Date: | Thu, 21 Feb 2002 06:11:16 +0000 |
| Subject: | Re: getting the "right" REMOTE_ADDR | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85682@lists.php.net to get a copy of this message | ||
I don't know too much about this, but IP checking is not a reliable way of identification anyway. Depending on how people connect to the internet, some people will have different IPs every time. Since I use a cable modem, my IP address rarely changes (if ever) so I use it as a safety net to prevent other users from accessing my files.
Steven J. Walker
Walker Effects
www.walkereffects.com
steve@walkereffects.com
On Wednesday, February 20, 2002, at 08:28 PM, sean@interconnect.is.it wrote:
Hi all, I need to know the exact ip of who is entering a site and I'm worried about proxies and spoofing. From php.net: http://www.php.net/manual/en/function.getenv.php This was listed: ============================ This gives you the right ip: if (getenv(HTTP_CLIENT_IP)){ $ip=getenv(HTTP_CLIENT_IP); } else { $ip=getenv(REMOTE_ADDR); } ============================ Is this really a fool-proof method of knowing exactly what the ip is that's getting onboard? Thanks! Sean ------------------------------- I N T E R C O N N E C T Internet Image DevelopmentTel: 505 989 3749http://www.InterConnect.is.it ------------------------------- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php