The result of an IP acquisition is not very perfect, the reason is because ip138 IP resolution is not very detailed when dealing with foreign addresses, so they re-write a code with chianz.com.
$IPADDR = "4.4.44.4";
$IPCHINAZADDR = "http://tool.chinaz.com/IP/?IP=". $ipAddr;
$contents = file_get_contents ($IPCHINAZADDR);
$pattern = "/==>>.+
/";
$string = $contents;
Preg_match_all ($pattern, $string, $addrArray);
$num = count ($addrArray [0]);
$pattern = "/(==>>). + (==>>s)/";
for ($i = 0; $i < $num; $i + +) {
$addrArray [0][$i] = preg_replace ($pattern, "", $addrArray [0][$i]);
}
echo "
echo "
";
?>
http://www.bkjia.com/PHPjc/444762.html www.bkjia.com true http://www.bkjia.com/PHPjc/444762.html techarticle The result of an IP acquisition is not very perfect, the reason is because the ip138 IP resolution foreign address is not very detailed, so re-write a chianz.com code. DOCTYPE h ...