Copy the code The code is as follows:
$ip="www.jb51.net"; //$ip can be changed to other domain names or IP addresses at will
$source=file_get_contents(' http://www.ip138.com/ips.asp?ip='.$ip.'&action=2');
//Regular matching
preg_match_all("/
) The above introduces the IP address location query IP138 IP address query thief implementation code, including the content of IP address location query. I hope it will be helpful to friends who are interested in PHP tutorials.