$url = ‘http://api.map.baidu.com/location/ip?ak=67jMQ5DmYTe1TLMBKFUTcZAR‘;
$data = file_get_contents($url);
print_r(json_decode($data)->content->address_detail);
博客列表 >php获取当前的定位城市
$url = ‘http://api.map.baidu.com/location/ip?ak=67jMQ5DmYTe1TLMBKFUTcZAR‘;
$data = file_get_contents($url);
print_r(json_decode($data)->content->address_detail);