How to get Country and City by IP Address

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?
 
E

ElfKiller

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top