Converting IP address to originating country


You might have noticed on several websites that it tells you the country you’re browsing from. How in the world do they do that?

Its actually quite simple. Based on your IP address, one can get a lot of information related to the ISP, and the country you’re connecting from. In fact, some databases you use, will allow you to drill down to city level as well.

If you have wanted to implement such a feature, and did not want to spend money buying a commercial database that does this conversion, here is a free database just for you, from WebNet77.

A lot of sample code is also provided for your reference. If a programming language of your choice is not listed there, just download one written in a different language and port it. Its a few lines of code that does this magic!

The IP database is updated every day and if you might want to determine a frequency at which you update your database with the latest one, depending on your use case scenario.

Do you know of any other free database that does the same thing?

Popularity: 5% [?]

Related Articles

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

 
 
Comments

No comments yet.

Leave a comment

(required)

(required)