(主要用了两个字符串函数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 "
";
?>
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn