Is there a way to detect if the site is running under a web server and local server.
+1, check that variable and match it against the ip ranges that are reserved for local/private use like "192.168.*.*" or "10.*.*.*" etc, etc.
Techpriester
2010-08-04 06:58:18
There's also `$_SERVER['HTTP_HOST']` if the devel and live servers have different names. Might be somewhat more portable, especially if the live server is actually a cluster with multiple IPs
Marc B
2010-08-04 11:26:23