Solved

How to derive the name of the country from the I.P. address?

Posted on 2001-08-27
5
250 Views
Last Modified: 2012-05-04
How to derive the name of the country from the I.P. address?
0
Comment
Question by:sandeepz_
5 Comments
 
LVL 20

Accepted Solution

by:
Silvers5 earned 200 total points
ID: 6428087
You can't effectively.. you'll need to use a reverse dns lookup component, like:

Dim RemoteIP, DNSx, Arec
RemoteIP=Request.ServerVariables ("REMOTE_ADDR")
Set DNSx=Server.CreateObject ("ASPDNS.DNSLookup")
Arec = DNSx.GetNameFromIP (Cstr(RemoteIP))

now the Arec will hold the domain name.. you can't be able to identify the user's country unless the domain is registred in a country's registrar.. like .ru for russia.. .us for usa.. and thus this is not 100% sure since a Domain isn't limited by geographical limits.. you can have a .ru domain that is hosted (or operated) in Zimbabway..also the user might be surfing using a proxy, thus you'll get the proxy ip instead of the user's ip

Free reverse dns component from:
http://www.internext.co.za/stefan/aspdns/

0
 
LVL 7

Expert Comment

by:weesiong
ID: 6428107
Silvers5 is correct :)

Regards,
Wee Siong
0
 
LVL 9

Expert Comment

by:AlfaNoMore
ID: 6432120
This might not be entirely what you want, but it might come close:

http://support.microsoft.com/support/kb/articles/Q229/6/90.ASP

Daniel.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 8755436
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[points to Silvers5]

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hongjun
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can not run ASP pages Windows 10 Edge browser. 5 104
Attaching a file to SMTP in Classic ASP 1 42
ASP Focus problem 3 67
Load data upon clicking a button 8 34
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 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