(.*)< /li>/isU",$so"/> (.*)< /li>/isU",$so">

Home  >  Article  >  Backend Development  >  IP address location query IP138 IP address query thief implementation code

IP address location query IP138 IP address query thief implementation code

WBOY
WBOYOriginal
2016-07-29 08:41:532615browse

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("/

  • (.*)print_r($result[1]);
    ?>
    Array

    (
    [0] => Main data of this site: United States
    [1] => Reference data one: United States
    [2] => Reference data two: Google Inc., Mountain View, California, United States

    ) 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.

  • 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