How to get Country and City by IP Address

Discussion in 'ASP .Net' started by Ribolovac, Nov 8, 2009.

  1. Ribolovac

    Ribolovac Guest

    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?
    Ribolovac, Nov 8, 2009
    #1
    1. Advertising

  2. Ribolovac

    ElfKiller Guest

    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("", "test",
    txtIP.Text, "CountryName");

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

    .... or for City by IP:

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

    Visual Basic:
    Dim GEO As com.webmastermafia.tools.GeoIPChecker = new
    com.webmastermafia.tools.GeoIPChecker();
    lblResult.Text = GEO.GetCity("", "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
    ElfKiller, Nov 8, 2009
    #2
    1. Advertising

  3. On Nov 8, 2:32 pm, "Ribolovac" <> wrote:
    > 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?


    Try to use MaxMind services
    http://www.maxmind.com/app/csharp
    Alexey Smirnov, Nov 9, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S.Guhananth
    Replies:
    1
    Views:
    532
    Alvin Bruney [Microsoft MVP]
    Apr 30, 2005
  2. Zyron
    Replies:
    2
    Views:
    1,478
    Jukka K. Korpela
    Nov 8, 2005
  3. bushi
    Replies:
    13
    Views:
    1,531
    Juan T. Llibre
    Apr 22, 2007
  4. bush
    Replies:
    3
    Views:
    277
  5. Petr Janda
    Replies:
    2
    Views:
    146
    rretzbach
    Mar 8, 2007
Loading...

Share This Page