[thelist] PHP: Find Wide-Area Network IP Address

Chris Blessing webguy at mail.rit.edu
Wed Jun 12 12:16:00 CDT 2002


David-

Since your server is local to your machine, it's no wonder it got 127.0.0.1.
For anyone else hitting the server it will get their remote IP as intended,
not their localhost ip. :)

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net

> > David Bindel:
> > Is there a PHP function to find your Wide Area
> > Network (WAN)
> > IP address?
> >
> > I have tried this on my own computer:
> >
> > echo $_SERVER['REMOTE_ADDR'];
> >
> > but it returns 127.0.0.1.... localhost, not my REAL IP
> > address.
> >
> > I have seen this feature on several websites, and
> > I need to
> > find some way to do it on a project that I am working on
> > right now.
>




More information about the thelist mailing list