Home >Backend Development >PHP Tutorial >Query code for obtaining website registration information implemented in PHP (360)_PHP tutorial

Query code for obtaining website registration information implemented in PHP (360)_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:13:011181browse

Copy code The code is as follows:

// WebSite http://www.micxp.com
function miibeian($domain) {
$domain = base64_encode ( $domain );
$opts = array (
" http' => array (
" 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, 'No website information found')) {
           return false;                                                       $html, $start, strpos ( $html, '' ) - $start );

$info = str_replace ( ' ', '', $info );
$info = str_replace ( '
  • Website name:', '', $info );
    $info = str_replace ( '
  • Website homepage address: ', ' ', $info );
    $info = str_replace ( '
  • Organizer name:', ' ', $info );
    $info = str_replace ( '
  • Type of organizer:', ' ', $info );
    $info = str_replace ( '
  • ', ' ', $info );
    $info = str_replace ( '
  • Website registration/license number:', ' ', $info );
    $info = str_replace ( "rn", '', $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

    http: //www.bkjia.com/PHPjc/313581.htmlTechArticleCopy the code as follows: ?php // WebSite http://www.micxp.com function miibeian($domain ) { $domain = base64_encode ( $domain ); $opts = array ( 'http' = array ( 'method' = "GET",...
    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