以有道的

function get_address_from_ip($ip)
{
$url='http://www.youdao.com/smartresult-xml/search.s?type=ip&q=';

$xml=file_get_contents($url.$ip);

$data=simplexml_load_string($xml);

return $data->product->location;

}

测试IP:

112.94.144.132

112.22.134.132

111.2.194.23

220.181.108.165

112.120.104.132

112.99.177.132

112.19.254.132

 

海外

156.2.194.132

197.2.194.132

111.92.194.23

220.101.188.115

使用如下:

<?php
echo get_address_from_ip("112.94.144.132");
?>

其他IP查询网:http://www.ip138.com/ips1388.asp?ip=

相关文章:

  • 2021-06-12
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2021-08-10
猜你喜欢
  • 2021-12-20
  • 2021-04-13
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案