欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

一个域名查询的程序_php基础

程序员文章站 2022-03-11 19:40:16
...
(主要用了两个字符串函数implode()和explode)
我制作的域名查询的源代码,主要用了两个字符串函数implode()和explode,利用这两个函数的切割字符串的强大功能,可以查询.com,.net.,org.,cc.,tv下的域名whois。
echo '
';
echo '';
echo '';
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); 
$hh=explode("",$ff);
$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 "";
echo '';
echo "";
echo "";
echo '';
echo "";
echo "";
echo "
";
echo '
域名whois查询系统
';
echo "
";
echo '
';
echo "
";
echo $whois;
echo "
";
echo "
";
echo '';
echo "
";
?>