Extracting the Country from the IP Address:- How To?

Introduction

Internet is vast & is spread across many countries & continents. Knowing the country of a visitor to your website can be a tedious task, if you don't know how to proceed.

The Need??
But firstly, the question that arises is why would you be interested in knowing the country of visitors to your website. The reasons can be many. Some of them are:
  • Displaying Geo-Specific Ads
  • Targetting Geo-Specific Visitors
  • Maintaining a Log of Visitors to the website
  • Displaying the website in local language
  • Re-directing the visitor to local website
  • Displaying Product Prices in Local Currencies
These are only a few reasons. There can be many more. However, you get the idea through these as to why you need to know the country of visitors to your website.

How??
Ok, you have the reason to know the country of your visitor, now the question is, how to proceed? How can you know the Country of your Visitor?

IP & the Country??
Every internet user has a unique IP address, or in other words, every computer connected to internet, has a unique IP address. IP address is a numerical address to refer to a computer. The example of an IP address is
120.36.162.75

Every ISP(Internet Service Provider) has been allocated a range of IP address which it can provide to its users. So, through an IP address, we can find out the country of the visitor.

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” - Tom Cargill