You are here: Re: [PHP] REMOTE_ADDR « PHP « IT news, forums, messages
Re: [PHP] REMOTE_ADDR

Posted by Richard Lynch on 03/14/05 18:59

> I am running PHP 5 on a Apache platform (Mac) and I have just noticed
> that the log I keep of ip's entering my site, is showing the internal
> server ip instead of the external visitor ip.
>
> I am using getenv("REMOTE_ADDR") and is has been working before.

Try $_SERVER['REMOTE_ADDR'] instead of getenv()

Not sure it will be different, but it's what I use...

It's possible your httpd.conf User is [re-]setting the environment
variable REMOTE_ADDR -- which may or may not be how Apache transmits that
to PHP -- I dunno, really.

If that doesn't help, perhaps <?php phpinfo(); ?> will help you sort out
what's what.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация