ColdFusion Programming/Getting client's computer name
Expert: Donald Hammond - 5/23/2008
QuestionQUESTION: i know how to get client's ipaddress using:
<cfset userip = #cgi.remote_addr#>
can i also get client's computer name? please help. thank you very much in advance.
ANSWER: cgi.remote_host If there is no name then the ip address is returned.
---------- FOLLOW-UP ----------
QUESTION: yeah, that code return the ipaddress of the client, but what do you mean by "if theres no name"? im sure all the client computer on our intranet has their corresponding computer name. how can i retrieve it using the code you gave. please please please be detailed.
AnswerFor security purposes the computer must be set up to respond with its name. Most computers have this feature turned off. Thus when you request the name, you will get the IP Address instead. On an intranet you can have the network security people check the setting and, if they allow it, turn it on. I do not recall what the exact name of the setting is.