Actually I'm just using it so a customer can acces a PWS that is
broadcasting on its own security cameras. I have a DSL that disconnects
every 8 hours, and gives dinamyc IP, so each time it connects it goes to
my site, and writes down the addres, so my customer can access the
report, and see what is the current IP address for it's server.

Thanks to all it worked.

-----Mensaje original-----
De: Jon Haworth [mailto:[EMAIL PROTECTED]] 
Enviado el: Miércoles, 02 de Octubre de 2002 10:19 a.m.
Para: [EMAIL PROTECTED]
Asunto: RE: [PHP] Getting users IP address into a variable.

Hi,

> > I'm sure there has to be a way to verify which IP 
> > address is accessing from.
> > $ip=HTP_GET_????
>  
> $REMOTE_ADDR

...and to deal with some (but not all) proxies:

$ip = (getenv("HTTP_X_FORWARDED_FOR"))
    ?  getenv("HTTP_X_FORWARDED_FOR")
    :  getenv("REMOTE_ADDR");

Either way you're still going to get stuff that isn't right, so make
sure
(a) you validate the contents of $ip before doing anything with it, and
(b)
you're not using it for anything critical.

Cheers
Jon

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to