Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get Country and City by IP Address

8 views
Skip to first unread message

Ribolovac

unread,
Nov 8, 2009, 8:32:14 AM11/8/09
to
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?


ElfKiller

unread,
Nov 8, 2009, 8:39:22 AM11/8/09
to
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("te...@webmastermafia.com", "test",
txtIP.Text, "CountryName");

Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCountry("te...@webmastermafia.com", "test",
txtIP.Text, "CountryName")

... or for City by IP:

C#:
com.webmastermafia.tools.GeoIPChecker GEO = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity("te...@webmastermafia.com", "test",
txtIP.Text, "City");

Visual Basic:
Dim GEO As com.webmastermafia.tools.GeoIPChecker = new
com.webmastermafia.tools.GeoIPChecker();
lblResult.Text = GEO.GetCity("te...@webmastermafia.com", "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

Alexey Smirnov

unread,
Nov 9, 2009, 8:20:17 AM11/9/09
to

Try to use MaxMind services
http://www.maxmind.com/app/csharp

0 new messages