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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reverse DNS lookup in ASP

Status
Not open for further replies.

orlandoj

Programmer
Feb 10, 2003
27
US
Hi,

I am designing a site on a remote server through hostmysite.com. The server supports ASP, and I recently made my own hit counter. I am trying to figure out how to get the DNS info of the hits to my site by using the IP address. I've done MANY searches online as to how to do this, and it seems that in every instance I'd have to install software on the server. I don't believe I can install software on this server being that it is a remote server. Is there any code I can use to script this reverse lookup function in ASP?

Thanks,
-Jamie
 
You want just the client's IP?
Code:
dim ip
ip = request.servervariables("REMOTE_ADDR")
I'm not entirely sure this will work 100% of the time, but its the right general direction. If its wrong, just go through the list at w3schools and find the right variable.
_______________________________________
Ignorance is a beautiful thing:
You don't know what you can't do...
 
Thanks,

I know how to get the IP already. My question was regarding getting the DNS name of the IP address. There are ways of doing it, but I haven't found a way to do it without installing software on the server.

-Jamie
 
Last try by me. Sorry if this doesn't help either.
Code:
dim ip
ip = request.servervariables("REMOTE_HOST")
_______________________________________
Ignorance is a beautiful thing:
You don't know what you can't do...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top