首页 >后端开发 >php教程 >一个域名查询的程序_PHP

一个域名查询的程序_PHP

WBOY
WBOY原创
2016-06-01 12:29:27754浏览

(主要用了两个字符串函数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); <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 "";
echo '';
echo "";
echo "";
echo '';
echo "";
echo "";
echo "
";
echo '
域名whois查询系统
';
echo "
";
echo '
';
echo "
";
echo $whois;
echo "
";
echo "
";
echo '';
echo "
";
?>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn