php under IP to get the location of the code of thief program
- 2020-05-07 19:22:16
- OfStack
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;
}
The above is true XXX written from open source China. I am embarrassed to post the news. It is easier to write with regular expressions
Take a look at
function get_ip_arr()
{
$ip=file_get_contents("http://fw.qq.com/ipaddress");
preg_match_all("/\"(.*)\"/",$ip,$arr);
return $arr;
}
It's going to return an array, and you can pick any region or ip that you want
You can also read the ip address from php, and this code has the advantage of saving resources.