无为清净楼资源网 Design By www.qnjia.com
(主要用了两个字符串函数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 '<div align="center">域名whois查询系统</div>';
echo "</td>";
echo "</tr>";
echo '<tr bgcolor="#FFFFFF">';  
echo "<td>";
echo '<div align="left">';
echo "<br>";
echo $whois;
echo "</div>";
echo "</td>";
echo "</tr>";
echo '<tr bgcolor="#ffcc33">';
echo "<td>";
echo '<div align="center"><a href="http://www.phpcode.net"><font face="Verdana, Arial, Helvetica, sans-serif">PHPcode.net</font></a></div>';
echo "</td>";
echo "</tr>";
echo "</table>";
?>
 
标签:
|一个|个域|域名|名查|查询|询的|的程|程序|序|

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com