On Wednesday 19 September 2001 13:13, Jon Haworth wrote:
> A better version would be:
>
> if (getenv(HTTP_X_FORWARDED_FOR)) {
>
> $ip=getenv(HTTP_X_FORWARDED_FOR);
> } else {
> $ip=getenv(REMOTE_ADDR);
> }
>
> This checks for proxy forwarding as well, if you just use
> REMOTE_ADDR you might end up with a proxy, not the real IP.
As I know HTTP_X_FORWARDED_FOR can contain more than one ip address,
it depends on how many proxies have forwarded the http answer.
Arpi
--
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]