Hi Cliff,

$_SERVER['SERVER_ADDR'] gives me the correct IP on a development server. Your mileage may vary for a local machine running apache locally...

Regards,
Khalid

On 9 Oct 2007, at 17:53, Cliff Hirsch wrote:

I am trying to get the server address of my development server, but $_SERVER[‘remote_addr’] and $_SERVER[‘server_addr’] keep giving me the localhost addr (127.0.0.1). Kinda makes it hard to create a URL for redirects.

The IP address should be 192.168.168.###, based on the current DHCP setting.

How do I get the IP address of the machine?

Cliff
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to