Re: Client IP

From: Date: Thu, 08 Jul 2004 01:14:25 +0000
Subject: Re: Client IP
References: 1 2 3 4 5 6 7 8  Groups: php.general php.general 
Request: Send a blank email to php-general+get-189937@lists.php.net to get a copy of this message
Rosen wrote:
Ok, I don't understand why IP adress will bi "invisible" for $_SERVER variable.
It should be there, but mostly because the CGI 1.1 spec requires that it be provided to the script. There is no physical requirement for it to be there. Reasons for it not being present could include: o Incomplete SAPI code; o A bug in the httpd or SAPI module, o etc... Even if it is there, it's entirely possible that it's just the IP address of a proxy--or even some other IP address entirely; it's not hard to spoof. Of course, all of this only applies when running as a CGI or module for handling web requests. No $_SERVER['REMOTE_ADDR'] will be set when running on the command line. Torben
"John W. Holmes" <holmes072000@charter.net> wrote in message news:40EC8965.9030102@charter.net...
Rosen wrote:
Can I get just adress of the IP, with which the server communicates ?
If you don't see the IP address somewhere in the $_SERVER variable, then
NO.
-- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com


« previous php.general (#189937) next »