Re: [PHP] FQDN of the server thru CLI

2006-04-21 Thread Edin Kadribasic
php_uname('n') Edin Venkat Venkataraju wrote: > Hi All > > I'm writing a bunch of cron scripts that send reports periodically using > phpmailer. > > I'm having a hard time trying to find the FQDN of the server. I need > that information to construct the from address for the emails. > > The $_

Re: [PHP] FQDN of the server thru CLI

2006-04-04 Thread Stut
Venkat Venkataraju wrote: i do not want to hardcode the hostname anywhere as these script will be copied onto many servers. is there a way i can find the fully qualified domain name thru PHP? If the system has been configured correctly the following should work... $hostname = trim(`hostname

Re: [PHP] FQDN of the server thru CLI

2006-04-04 Thread Hans Juergen von Lengerke
I usually do this by forcing the profile to be read before I run the script. Something like * * * * * . /etc/profile && /path/to/script > Date: Tue, 04 Apr 2006 17:43:09 +0530 > From: Venkat Venkataraju <[EMAIL PROTECTED]> > To: php-general@lists.php.net > Subject: [PHP] FQDN of the server th