一個域名查詢的程序

(主要用瞭兩個字符串函數implode()和explode)
我制作的域名查詢的源代碼,主要用瞭兩個字符串函數implode()和explode,利用這兩個函數的切割字符串的強大功能,可以查詢.com,.net.,org.,cc.,tv下的域名whois。
<?php(做為現在的主流開發語言)
echo <center><form>;
echo <input type=”text” name=”string”>;
echo <input type=”submit” value=”查詢”>;  
echo “</form>”;
if (isset($string))  
{
$url = “http://networksolutions.com/cgi(現在已經不多人在用瞭)-bin/whois/whois?STRING=”.$string.”&STRING=Search”;  
$str = implode(“”,file($url));        
$aa= explode(“<pr”,$str);      
$bb=$aa[1];
$cc=explode(“re>”,$bb);
$dd= $cc[0];
$ee=explode(“e>”,$dd);
$ff=implode(“<pre>”,$ee);
$hh=explode(“</p”,$ff);
$jj=implode(“</pre>”,$hh);
$kk=explode(“Registrant”,$jj);
$ll=implode(“<font color=red>註冊人</font>”,$kk);
$mm=explode(“Domain Name”,$ll);
$nn=implode(“<font color=red>域名</font>”,$mm);
$oo=explode(“Administrative Contact”,$nn);
$pp=implode(“<font color=red>管理聯系人</font>”,$oo);
$qq=explode(“Technical Contact”,$pp);
$ii=implode(“<font color=red>技術聯系人</font>”,$qq);
$ss=explode(“Record last updated on”,$ii);
$tt=implode(“<font color=red>最後更新日期:</font>”,$ss);
$uu=explode(“Record expires on”,$tt);
$vv=implode(“<font color=red>域名到期日期:</font>”,$uu);
$ww=explode(“Record created on”,$vv);
$xx=implode(“<font color=red>域名註冊日期:</font>”,$ww);
$yy=explode(“Database last updated on”,$xx);
$zz=implode(“<font color=red>數據庫更新日期:</font>”,$yy);
$aaa=explode(“Record updated on”,$zz);
$bbb=implode(“<font color=red>記錄更新日期:</font>”,$aaa);
$ccc=explode(“Admin Name”,$bbb);
$ddd=implode(“<font color=red>管理聯系人</font>”,$ccc);
$eee=explode(“Tech Name”,$ddd);
$whois=implode(“<font color=red>技術聯系人</font>”,$eee);
}
echo <center><table width=”50%” border=”0″ cellspacing=”1″ cellpadding=”0″ bgcolor=”#FF6666″>;
echo <tr bgcolor=”#ffcc33″>;
echo “<td>”;
echo <p align=”center”>域名whois查詢系統</p>;
echo “</td>”;
echo “</tr>”;
echo <tr bgcolor=”#FFFFFF”>;  
echo “<td>”;
echo <p align=”left”>;
echo “<br>”;
echo $whois;
echo “</p>”;
echo “</td>”;
echo “</tr>”;
echo <tr bgcolor=”#ffcc33″>;
echo “<td>”;
echo <p align=”center”><a href=”http://www.php(做為現在的主流開發語言)code.net”><font face=”Verdana, Arial, Helvetica, sans-serif”>php(做為現在的主流開發語言)code.net</font></a></p>;
echo “</td>”;
echo “</tr>”;
echo “</table>”;
?>
 

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。