当前位置:Gxlcms > PHP教程 > 一个域名查询的程序_php基础

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

时间:2021-07-01 10:21:17 帮助过:2人阅读

(主要用了两个字符串函数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); 
$hh=explode("$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 'PHPcode.net';
echo "
";
?>

人气教程排行