高性能的城市定位API接口

如果不需要精准的定位,还有一种通过IP地址获取当前城市的方法,采用新浪的api接口。

<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script>
    var city = remote_ip_info['city'];
    alert(city)
</script>
原文地址:https://www.cnblogs.com/wlphp/p/8449423.html