我想在 php 中找到用户的当前位置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10562265/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 22:28:27  来源:igfitidea点击:

I want to find current location of user in php

phpgeolocationgoogle-api

提问by rash111

i am using http://api.easyjquery.com/ips/?ip=115.119.253.90&full=truethis api for getting current location but when this site goes down i am not able to get current location.

我正在使用http://api.easyjquery.com/ips/?ip=115.119.253.90&full=true这个 api 来获取当前位置,但是当这个站点关闭时,我无法获取当前位置。

can google provide any api to find current location using ip.

谷歌可以提供任何api来使用ip查找当前位置吗?

采纳答案by Moyed Ansari

If you don't want to use the HTML5 Geolocoation API, you can detect a bit from IP.

如果您不想使用 HTML5 Geolocoation API,您可以从 IP 中检测一下。

Or try other other solution

或尝试其他解决方案

The Google Geocoding API

谷歌地理编码 API

Geolocator-PHP

地理定位器-PHP

Maxmindhttp://www.maxmind.com/app/php

Maxmind http://www.maxmind.com/app/php

ipinfodb

数据库