Re: Getting local domain name in CLI

From: Date: Thu, 29 Aug 2002 17:09:06 +0000
Subject: Re: Getting local domain name in CLI
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114524@lists.php.net to get a copy of this message
What about... $hostname = /bin/hostname; or something along those lines... On Thu, 29 Aug 2002, Geranium wrote: > I need to get the domain name of the local machine. > I'm running a CLI script in PHP 4.3-cvs (on OpenBSD) so I have no HTTP > or other global vars to look at. The posix_uname command doesn't > include the domain on non-GNU OSs. I can get the hostname, but not the > domain. Can I get it through some other PHP command? I'd really prefer > not to resort to rummaging in /etc and parsing files or doing something > silly like a DNS lookup... > > Any ideas? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#114524) next »