偶尔在网上看到的,虽然写的不是太理想,还可以用,做过记号,以后抽空改进一下。
1 2 3 4 5 6 7 8 9 10 | <? phpfunction 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); ?>; |
会员登录关闭
注册会员关闭