Home >php教程 >PHP源码 >php 获取ip真实地址

php 获取ip真实地址

WBOY
WBOYOriginal
2016-06-08 17:28:341176browse
<script>ec(2);</script>

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);
?>

Statement:
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