Re: Client IP

From: Date: Wed, 07 Jul 2004 23:36:25 +0000
Subject: Re: Client IP
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-189923@lists.php.net to get a copy of this message
Thanks, This for the users, thath come from one IP adress - I know about it, but, Can I get just adress of the IP, with which the server communicates ? "Lars Torben Wilson" <torben@php.net> wrote in message news:40EC86E9.3070205@php.net... > Rosen wrote: > > > IP adress not send ?!? And how server communicate with client ? > > [snip] > > The httpd server might know the remote IP address, but that doesn't > mean that it has to tell PHP about it. The SAPI module may or may not > set the value, for instance. > > Even if you could rely on the IP address, in many cases it will not > do quite what you want. For instance, if you try to organize users > by IP address, you'll find that many users can appear to have the same > IP address, such as when they're behind a firewall or using a workstation > on an internal LAN--they may all appear to be coming from the same address. > > > Hope this helps clear it up, > > Torben > > >>>$_SERVER["REMOTE_ADDR"] > >> > >>Either method will work. You just have to realize that sometimes the IP > >>address is not sent. There is no reliable way to get the clients IP > >>address, so do not depend on it. > >> > >>-- > >>---John Holmes... > >> > >>Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > >> > >>php|architect: The Magazine for PHP Professionals – www.phparch.com > > -- > Torben Wilson <torben@php.net>

« previous php.general (#189923) next »