?
Solved

Getting the client's host name

Posted on 2003-03-23
9
Medium Priority
?
159 Views
Last Modified: 2010-04-07

Hello everybody.

Could somebody help me how to get the client's host name? I already used the Request.ServerVariables ("REMOTE_HOST")but the host name points to the web server. I need the client's host name who runs the web page. Please help.
0
Comment
Question by:Faiga Diegel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 5

Expert Comment

by:gator4life
ID: 8193713
Request.ServerVariables("REMOTE_ADDR") will give you the IP address of the client host where the request originated.  Usually, client IP addresses are not mapped to a name through a DNS, so this is the best that you can do.  Happy programming.

gator4life
(chomp, chomp)
0
 
LVL 17

Accepted Solution

by:
dorward earned 80 total points
ID: 8195527
0
 
LVL 1

Expert Comment

by:HanbingL
ID: 8205991
That should be Request.ServerVariables("LOGON_USER")
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
LVL 5

Expert Comment

by:gator4life
ID: 8209947
Actually, it depends on what faiga16 is trying to accomplish.  The "LOGON_USER" ServerVariable contains the Windows account that the user is impersonating while connected to your Web server.  If every user connects to the web server through anonymous access (the IUSR account), then this ServerVariable contains nothing.  However, if the users are being authenticated at this server, then this ServerVariable will contain a username value, not necessarily a "client host name".  When I think of a "client host", I think of the user agent (i.e. the browser) that is accessing the web server, not the user.  Therefore, if this is the case then the "REMOTE_ADDR" ServerVariable is indeed the correct variable to retrieve.

gator4life
(chomp, chomp)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9305733
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 5

Expert Comment

by:gator4life
ID: 9306672
COBOL -

I would like to be considered for the points on this question.  The question poster never clarified exactly what they were trying to achieve after the experts posted responses, so I assume that one of our responses helped them.  In fact, my answer was a solution that would solve the problem originally asked.

gator4life
(chomp, chomp)
0
 
LVL 17

Expert Comment

by:dorward
ID: 9308039
The original question specifically asked for the host name, that has a defined meaning in networking and is not synonymous with either "host ip address" or "username". I don't see any indication that the origional question was intended to get the username, although I admit that the host ip address might have been acceptable to the questioner.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 10590121
force accepted

COBOLdinosaur
PE Web Development
0
 
LVL 15

Author Comment

by:Faiga Diegel
ID: 10602391

Hello everyone,

I am so sorry for I did not closed this question. Honestly, it's been a long time since I open my account here and need to refresh my mind on how to close an open questions. It took me a while browsing and looking for help on how to view my pending questions.

Anyway, sorry again. I will be online more often.

Thanks :=)
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question