Solved

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

Posted on 2001-08-27
5
251 Views
Last Modified: 2012-05-04
How to derive the name of the country from the I.P. address?
0
Comment
Question by:sandeepz_
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Recordset containing single quotes 8 48
Downside of adding characters set in ASP pages 6 36
key press alert 2 41
MS SQL + date 6 41
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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

735 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