<?php $ip="你要查的ip"; $url="http://ip.taobao.com/service/getIpInfo.php?ip=".$ip; var_dump(json_decode(file_get_contents($url))); ?>