How to get Country and City by IP Address

  • Thread starter Thread starter Ribolovac
  • Start date Start date
R

Ribolovac

How can I cet City and Country name by IP Address in ASP.NET. I need C# or
VB Code.
Is there any component or web service which have this feature?
 
You can use WM GEoIP web service. It is free and easy to use. You can
find info at http://tools.webmastermafia.com
1. You need to add web reference: http://tools.webmastermafia.com/GeoIPChecker.asmx
2. Enter code for country check:

C#:
com.webmastermafia.tools.GeoIPChecker GEO = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCountry("(e-mail address removed)", "test",
txtIP.Text, "CountryName");

Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCountry("(e-mail address removed)", "test",
txtIP.Text, "CountryName")

.... or for City by IP:

C#:
com.webmastermafia.tools.GeoIPChecker GEO = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity("(e-mail address removed)", "test",
txtIP.Text, "City");

Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity("(e-mail address removed)", "test",
txtIP.Text, "City")

It is free for use. You don't need to register but in that case, web
service has time delay (3 seconds). If you are registred, you can use
it without delay. Registration is free at http://tools.webmastermafia.com
 
Back
Top