`

通过IP获取地理位置

    博客分类:
  • PHP
QQ 
阅读更多
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;  

} 

 

分享到:
评论
1 楼 zyhui98 2011-09-13  
file_get_contents用不了

相关推荐

Global site tag (gtag.js) - Google Analytics