(主要用了兩個字串函數implode()和explode)
我製作的網域查詢的源代碼,主要用了兩個字串函數implode()和explode,利用這兩個函數的切割字串的強大功能,可以查詢.com,.net.,org.,cc.,tv下的網域whois。
echo '
";
if (isset($string))
{
$url = "http://networksolutions.com/ cgi-bin/whois/whois?STRING=".$string."&STRING=Search";
$str = implode("",file($url));
$aa= explode("$bb=$aa[1];
$cc=explode("re>",$bb);
$dd= $cc[0];
$ee=explode("e>",$dd);
$ff=implode("",$ee); <br>$hh=explode("",$ff); <br>$jj=implode("
登入後複製
",$hh);
$kk=explode("Registrant",$jj);
$ll=implode("註冊人",$kk);
$mm=explode("Domain Name",$ll);
$nn=implode("網域" ,$mm);
$oo=explode("Administrative Contact",$nn);
$pp=implode("管理聯絡人",$oo);
$qq=explode("Technical Contact",$pp);
$ii=implode("技術聯絡人",$qq);
$ss =explode("Record last updated on",$ii);
$tt=implode("最後更新日期:",$ss);
$uu=explode ("Record expires on",$tt);
$vv=implode("網域到期日:",$uu);
$ww=explode(" Record created on",$vv);
$xx=implode("網域名稱註冊日期:",$ww);
$yy=explode("Database last updated on",$xx);
$zz=implode("資料庫更新日期:",$yy);
$aaa=explode("Record updated on", $zz);
$bbb=implode("記錄更新日期:",$aaa);
$ccc=explode("Admin Name",$bbb);
$ddd=implode("管理聯絡人",$ccc);
$eee=explode("Tech Name",$ddd);
$whois =implode("技術聯絡人",$eee);
}
echo '
';
echo '';
echo ""; echo '網域whois查詢系統 '; echo " | ";
echo "
";
echo '';
echo ""; echo ''; echo " "; echo $whois; echo " "; echo " | ";
echo "
";
echo '';
echo " "; echo ''; echo " | ";
echo "
";
echo "
";
?>
http://www.bkjia.com/PHPjc/315837.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/315837.htmlTechArticle(主要用了兩個字串函數implode()和explode) 我製作的網域查詢的來源程式碼,主要用了兩個字串函數implode()和explode,利用這兩個函數的切割字元...