您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

根据IP查询经纬度

2024/5/5 12:05:28发布7次查看
根据本地ip查询接口查询出经纬度与当前路径
 //通过接口获取所在地址ip
        public function is_where(){
            header(content-type:text/html;charset=utf8);
            $content = file_get_contents(http://api.map.baidu.com/location/ip?ak=7iz6fggegohcrrkue9rj4tsq&ip={$getip}&coor=bd09ll);
            //echo $getip;die;
            $json = json_decode($content);
$arr = array($json->{'content'}->{'point'}->{'x'},$json->{'content'}->{'point'}->{'y'}, $json->{'content'}->{'address'});//按层级关系提取经度数据
            return json_encode($arr);
        }
ad:真正免费,域名+虚机+企业邮箱=0元
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录