By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,743 Members | 1,803 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,743 IT Pros & Developers. It's quick & easy.

getenv()

P: n/a
Is there a variable to fetch with getenv that gives you the client host name.
I can't find it in my docs so I suppose there isn't but it would be handy to be
able to insert the "computer name" of the calling computer in some cases.
(as my dev box is "Carnelian". I would like to do something like:
$clientdev = getenv('HOST_NAME');

/M.
--
Martin Skjöldebrand
Family site: http://www.skjoldebrand.org
"Art" site: http://martoni.deviantart.com
Public key available at: http://wwwkeys.pgp.net
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Thu, 08 Apr 2004 04:29:02 +0000, Martoni wrote:
Is there a variable to fetch with getenv that gives you the client host
name. I can't find it in my docs so I suppose there isn't but it would
be handy to be able to insert the "computer name" of the calling
computer in some cases. (as my dev box is "Carnelian". I would like to
do something like: $clientdev = getenv('HOST_NAME');

/M.

$clientdev = $_SERVER['HTTP_HOST'];
is the preferred "new" method.. but HTTP_HOST is what you're after =)

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/

Jul 17 '05 #2

P: n/a
Martoni <ka******@yahoo.com> wrote in message news:<87************@yahoo.com>...
Is there a variable to fetch with getenv that gives you the client host name.
I can't find it in my docs so I suppose there isn't but it would be handy to be
able to insert the "computer name" of the calling computer in some cases.
(as my dev box is "Carnelian". I would like to do something like:
$clientdev = getenv('HOST_NAME');


Hostname is not available in env variables. But, this may work
<http://in2.php.net/gethostbyaddr>

--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.