Copy Code code 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);
$html = file_get_contents ($url, False, $context);
if (Strpos ($html, ' not queried to site information ')) {
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> website home address:</strong> ', ', $info);
$info = str_replace (' <li><strong> organizer name:</strong> ', ', $info);
$info = str_replace (' <li><strong> organizer Nature:</strong> ', ', $info);
$info = str_replace (' <li><strong> Audit time:</strong> ', ', $info);
$info = str_replace (' <li><strong> website record/license number:</strong> ', ', $info);
$info = Str_replace ("\ r \ n", ", $info");
$info = str_replace (' </li> ', ', $info ');
$info = Trim ($info);
$temp = Explode (", $info);
return $temp;
}
$result = Miibeian (' jb51.net ');
Print_r ($result);