<?php
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;
 
 echo $data;
 
}?>
上面这段代码可以实现,比如IP是 61.57.140.70如何输出 真实 地址呢?