Solved

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

Posted on 2001-08-27
5
249 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

776 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