PHP implementation of access to the website record Information Query Code (_php) tutorial

Source: Internet
Author: User
Copy CodeThe code is as follows:
WebSite http://www.micxp.com
function Miibeian ($domain) {
$domain = Base64_encode ($domain);
$opts = Array (
' http ' = = Array (
' Method ' = ' GET ',
' Timeout ' = 5
)
);
$context = Stream_context_create ($opts);
$url = ' http://webid.360.cn/complaininfo.php?domain= '. $domain;
$html = File_get_contents ($url, False, $context);
if (Strpos ($html, ' do not query to website Information ')}) {
return false;
}
$flag = '
      ';
      $start = Strpos ($html, $flag) + strlen ($flag);
      $info = substr ($html, $start, Strpos ($html, '
')-$start);

$info = Str_replace (', ', ', $info);
$info = Str_replace ('
  • website Name:', ', $info);
    $info = Str_replace ('
  • website Home Address:', ', $info);
    $info = Str_replace ('
  • Organizer Name:', ', $info);
    $info = Str_replace ('
  • The nature of the organizer:', ', $info);
    $info = Str_replace ('
  • Audit Time:', ', $info);
    $info = Str_replace ('
  • website Record/license number:', ', $info);
    $info = Str_replace ("\ r \ n", ", $info);
    $info = Str_replace ('
  • ', ', $info);
    $info = Trim ($info);
    $temp = Explode (' ', $info);
    return $temp;
    }
    http://webid.360.cn/complaininfo.php?domain=c3lzeXVuLmNvbQ==
    $result = Miibeian (' jb51.net ');
    Print_r ($result);

    http://www.bkjia.com/PHPjc/313581.html www.bkjia.com true http://www.bkjia.com/PHPjc/313581.html techarticle Copy the code as follows: PHP//WebSite http://www.micxp.com function Miibeian ($domain) {$domain = Base64_encode ($domain); $opt s = Array (' http ' = Array (' method ' = ' GET ',...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.