Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get computer name

Status
Not open for further replies.

dreeves33

IS-IT--Management
Aug 5, 2002
16
US
is there anyway to get a computer name of a client using coldfusion? We have an inventory system that we are using and i thought it would be neat to get the computer name anlong with the ip address of our workstations (i understand that you can get the ip address and try to reverse it to the computer name but since not all of the computers are at one site that will not work).

Thanks for the time in advance!
 
I don't think the computer's name is sent back in the request header but you can do a <cfdump var = "#cgi#"> and see if there is anything usefull.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Not sure if this is exactly what you are looking for but the built in java.net.InetAddress class has some useful methods.


This returns the machine name of the server i.e. the machine coldfusion is running on

Code:
<cfscript>
 obj = createObject("java","java.net.InetAddress");
 machineName = obj.getLocalHost().getHostName();
</cfscript>
 
I saw an applet that can do this a couple of years ago, but I don't recall the site now.

You could start here:


HTH,

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
I'm not as think as you confused I am.
-----------
Flabbergasted (a.): Amazed at how much weight one has gained.
-----------
Oyster (n.): One who sprinkles their conversation with Yiddish expressions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top