Copy codeThe Code is as follows:
<? Php
// 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, 'no website information found ')){
Return false;
}
$ Flag = '<ul> ';
$ Start = strpos ($ html, $ flag) + strlen ($ flag );
$ Info = substr ($ html, $ start, strpos ($ html, '</ul>')-$ start );
$ Info = str_replace ('','', $ info );
$ Info = str_replace ('<li> <strong> website name: </strong>', ', $ info );
$ Info = str_replace ('<li> <strong> Homepage Address: </strong>', ', $ info );
$ Info = str_replace ('<li> <strong> organizer name: </strong>', '', $ info );
$ Info = str_replace ('<li> <strong> subject nature: </strong>', '', $ info );
$ Info = str_replace ('<li> <strong> audit time: </strong>', '', $ info );
$ Info = str_replace ('<li> <strong> website record filing/license No.: </strong>', ', $ info );
$ Info = str_replace ("\ r \ n", '', $ info );
$ Info = str_replace ('</li>', '', $ info );
$ Info = trim ($ info );
$ Temp = explode ('', $ info );
Return $ temp;
}
// Http://webid.360.cn/complaininfo.php? Domain = c3lzeXVuLmNvbQ =
$ Result = miibeian ('jb51. net ');
Print_r ($ result );