Results 1 to 10 of 10

Thread: How to get IP Location?

  1. #1
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to get IP Location?

    hey Guys I am new to the board, but I will give this a shot.

    I am working on an invoice system and I want to be able to do is list the IP and its location

    Example I know using the:
    <%
    Request.ServerVariables("REMOTE_HOST")
    %>
    gives me the IP address. Is there a way to drill down further.

    Example down to the country and city?
    I have seen it done on a few order forms when placing orders I want to know how I can drill down on this as well.

    THanKS

    FastBurst

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Think there's something on w3 schools, see this example:

    http://www.w3schools.com/asp/showasp...me=demo_server

    While doing some Google Map research also found this cool tool.

    http://www.rleeden.no-ip.com/geotool.php

    No good to you but interesting all the same :O)

    Cheers

  3. #3
    Join Date
    Sep 2006
    Location
    Livonia MI (USA)
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    One solution is to use JS:

    <script>
    var my_url=document.URL;
    var root_url=my_url.indexOf('Link.asp');
    document.write(my_url.substring(0,root_url));
    </script>

    In this example I wanted just the url and not the actual asp file name

  4. #4
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Are you plan to build a system link this ?
    http://wwwvpn.privacyconnector.com:2...converter.aspx

    http://www.privacyconnector.com

    You first need a database contain a mapping between IP and location. You can find this kind of database from some warez homepage

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Well, there's some related info on this using PHP here--
    http://www.dynamicdrive.com/forums/s...ad.php?t=15036

    Using the same data and method, you could convert to ASP and go from there. (Or just switch to PHP and use the script supplied there if you'd prefer.)


    Note: it's a fairly long discussion... starts being helpful mid-page-2.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    I think using something like this one will solve your problem completely.

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I'm guessing that's similar to the solution used in the thread I linked to-- http://www.maxmind.com/app/geoip_country

    Probably worth looking into. However... the link isn't loading for me.

    EDIT: Now it loads, but looks like it costs $50. The one linked to above also is $50, I believe, but there is a free 'limited' version to use, which seems like it would probably do just fine.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The industry standard is MaxMind GeoIP.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Jul 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to get IP locations

    U get the IP location of an IP address by using http://www.ip-details.com/ip-search/.

  10. #10
    Join Date
    Jan 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can check out the open source APIs and source codes for different programming languages from http://www.ip2location.com/developers.aspx

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •