http://fw.qq.com/ipaddress返回类似:var IPData = new Array("61.51.71.183","","北京市","");
<?php
function get_ip_place(){
$ip=file_get_contents(http://fw.qq.com/ipaddress);
$ip=str_replace('"',' ',$ip);
$ip2=explode("(",$ip);
$a=substr($ip2[1],0,-2);
$b=explode(",",$a);
return $b;
}
$ip=get_ip_place();
print_r($ip);
?>