Home > Backend Development > PHP Tutorial > php利用QQ获取ip,省份,市

php利用QQ获取ip,省份,市

WBOY
Release: 2016-06-13 11:02:42
Original
807 people have browsed it

php利用QQ获取ip,省,市

<?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); ?>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template