473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

getenv()

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
2 2710
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JDJones | last post by:
I am trying to write a PHP action into my custom 404 error page that will email me when someone tries to access a bad link. I can get it to work and tell me the person's IP using <$ip = getenv...
1
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if...
0
by: Xavier | last post by:
Greetings, While messing around with the "dl" module I ran into a segfault. *DO NOTE THAT THE FOLLOWING OCCURED ON 2 OF MY LINUX WORKSTATIONS* ------ # python -c 'import dl;...
1
by: vertigo | last post by:
Hello i need to read $PATH variable for all users. I wanted to use something like setuid() and getenv() in C. Are there similar functions here ? (if not how can i do it ?) Thanx Michal
5
by: Chad Paquette | last post by:
Hi, We have a legacy cgi app that's written in C. We are encountering an error when we try to retrieve a cgi environment variable. The variable we are getting contains a Base64 encoded...
10
by: Protoman | last post by:
What does getenv() do and why would you use it?
17
by: Protoman | last post by:
Why does getenv work backwards? When I'm testing an env variable, I have to test if its NOT equal to, rather than equal to, to get the desired result. As evidenced by this simple piece of code: ...
5
by: silrandir | last post by:
when attempting to call getenv() in global memory (c/c++), it constantly returns null, but when called in main, it properly reads the environment. is this expected behavior? sample code:...
4
by: Yogi Watcher | last post by:
Hi, Recently I have observed some odd behavior of getenv and putenv function. I am developing some code that integrates with several other libraries. This program is not using MFC. It is plain C...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.