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

IP address location query IP138 IP address query thief implementation code

WBOY
Release: 2016-07-29 08:41:53
Original
2629 people have browsed it

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.

  • Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template