Is It Possible to get a (rough) Mobile Phone Location from a HTTP Request

前端 未结 5 1020
误落风尘
误落风尘 2020-12-19 06:55

If memory serves me correctly, google does this for the maps site. I know google\'s mobile maps app can determine the rough location (I assume using some kind of cell tower

5条回答
  •  一个人的身影
    2020-12-19 07:48

    With a regular HTTP request the only option you have is GeoIP but this will only give you the country & operator no better.

    Depending on the application & device you are using there are various option for geolocation, for example iPhone & Android browsers suport the HTML5 geo javascript functions so you could put some code in the page to send you the location. However these all involve some client side code.

    The other option involves doing a deal with the networks, they can supply you the phone number as an additional header in the request and you can then query this number via an API from the operator to get the location of the phone from the network. However they charge a pretty penny for this function and the accuracy can vary from about 100m in an urban environment to 35Km in very rural areas.

提交回复
热议问题