How to retrieve web server ip
Posted: Wed Jul 09, 2003 1:04 pm
I was using $_SERVER['LOCAL_ADDR'] to determine the IP of the webserver. This works fine if run from an 'external browser' but when the browser is run from the web server it gives me 127.0.0.1...
I have used phinfo to look at all the server vars, they are all set to 127.0.0.1, I was hoping maybe there was a constant set by php or some other method.
this is win2k/IIS/php4.3.1
Does anyone have an idea how I can get the actual IP when I run from the server.
Thanks.
I have used phinfo to look at all the server vars, they are all set to 127.0.0.1, I was hoping maybe there was a constant set by php or some other method.
this is win2k/IIS/php4.3.1
Does anyone have an idea how I can get the actual IP when I run from the server.
Thanks.