GeoLocation use IP address to find Country using Visual Basic (VB.NET)

GeoLocation use IP address to find country using Visual Basic

GeoLocation use IP address to find country using Visual Basic

 

This is a really easy way for Visual Basic web developers to find out which country their visitors are from.

Just download the Visual Basic (VB.NET) API and the Free GeoLite Country database from MaxMind.  I did not need regions or cities. I was not even too worried if the data was less than 99.9% accurate. 99.5% was plenty accurate for a Luddite developer.

In addition to being free, Maxmind get extra points for having a visual basic version which was really easy to copy into my project.

There was one little ooops.

On line 152 of the CountryLookup.vb file I had to make one minor change:

            _Address = IPAddress.Parse(_IPAddress) ‘    I Changed the code from _Address.Parse(_IPAddress) to IPAddress.Parse(_IPAddress).

MaxMind offer a number of options starting with their Country Code database and expanding details through Region, City, Metro Code, Organization, ISP and more.

You can can more details of MaxMind’s Geo Location products here.

Advertisements

2 thoughts on “GeoLocation use IP address to find Country using Visual Basic (VB.NET)

  1. Thanks a lot for the pointers. Exactly what I need for my project to ascertain demographics for my free program users. I tried most of the online tools via cut and paste, but with a database of over 2,000 it was a bit of a task and this is a life saver!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s