What services can I used to find a user's location based on their IP address?

前端 未结 11 1657
北海茫月
北海茫月 2020-12-04 07:00

If you need to locate a user based on their IP address, what services are available (free and not free services are fine)?

P.S. I understand that some users use prox

相关标签:
11条回答
  • 2020-12-04 07:37

    Most geolocation services allow you to download a database full of IP Address to city or country maps. Some also provide web service apis for free (limited number of requests) or a paid subscription.

    MaxMind has one such service that you can use which is free to determine the user's location. Their minFraud service allows 500 free queries per day.

    A sample for their web service in ASP

    Dim objHttp, strQuery
    strQuery = "http://geoip1.maxmind.com/a?l=" & license_key & _
        "&i=" & ipaddress
    set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
    objHttp.open "GET", strQuery, false
    objHttp.send
    Response.Write objHttp.ResponseText
    Set objHttp = Nothing
    

    They also offer APIs for determing credit card fraud probability based on location, card number, etc, in their paid version.

    Another service is ip2location. John Millikin

    Also, IPLigence offers 50 free queries a day.

    For .NET Coders, there is the IPAdressExtensions module (open source, free and no web service required) purekrome


    More info about geolocation is available on wikipedia.

    0 讨论(0)
  • 2020-12-04 07:38

    There was a brilliant solution using those adult ads ie. "women in YOUR_TOWN would like to 'meet' you tonight"

    Somebody worked out a way to extract the location string without loading the ad.
    I can't find the code, searching google for adult ads isn't terribly effective, but somebody here might remember it.

    0 讨论(0)
  • 2020-12-04 07:39

    It's also worth noting that MaxMind allow you to download their geolocation database as a CSV file:

    • http://www.maxmind.com/app/geolitecity
    0 讨论(0)
  • 2020-12-04 07:40

    Geolocation with ClientLocation generally works and you get it free when you use Google's JSAPI.

    • Demo site
    0 讨论(0)
  • 2020-12-04 07:45

    Easy intro to using MaxMinds downloadable database in PHP Geolocation

    0 讨论(0)
  • 2020-12-04 07:51

    I recommend userlocation.com. It's easy to use and affordable and it's quite accurate.

    0 讨论(0)
提交回复
热议问题