Re: Howto detect the hostname of the server?
| From: | Andreas | Date: | Sat, 26 Nov 2011 01:27:11 +0000 |
| Subject: | Re: Howto detect the hostname of the server? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315816@lists.php.net to get a copy of this message | ||
Am 26.11.2011 01:35, schrieb Simon J Welsh:
On 26/11/2011, at 1:14 PM, Andreas wrote:Great, that even works on a ssh-tunnel. I got derailed by the fact that my tunnel maps the remote server to localhost:80 so $_SERVER['SERVER_ADDR'] and $_SERVER['SERVER_NAME'] wouldn't help. On the other hand for everyone on the remote LAN $_SERVER['...'] would work ok, though I didn't realise that before. Thanks :)how could I identify the server the script runs on?php_uname('n'); http://php.net/php_uname