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.
Asunto: RE: [PHP] Getting users IP address into a variable.


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

...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
(a) you validate the contents of $ip before doing anything with it, and
you're not using it for anything critical.


PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to