域名查询代码公布

2018-09-07 14:16

阅读:325

  域名查询代码公布
<?php
// 网络技术主管座右铭:三人行,其必有我师焉。
// 这个代码可以是说是非常的SMART,我改动了小小部分使它更容易用。

$moreinfolist = array( // 储存WHOIS查询主机的连接方法
at =>
au =>
bm =>
ch =>
com=>
cz =>
de =>
dk =>
edu=>
es =>
fi =>
fo =>
fr => harmonic.nic.fr/cgi-bin/HarmoNIC.pl?Annu_Suffixe=&Annu_Action=Rechercher&Annu_Automaton_State=17&Annu_Motif=,
gl =>
gm =>
gov=>
gr =>
hu =>
ie =>
il =>
is =>
it =>
jp =>
lb =>
li =>
lt =>
lv =>
mc =>
mil=>
ms =>
mx =>
net=>
no =>
nz =>
org=>
pt =>
ro => whois.rotld.ro/cgi-bin/whois?whois=,
sk =>
sm =>
tc =>
tf =>
th =>
tj =>
uk =>
va =>
vg =>
);

# where can we get more info?
$moreinfo = FALSE;
for ( reset($moreinfolist) ; list($tail, $moreinfoname) = each($moreinfolist) ; )
if ( eregi("\\.$tail\$", $address) ) { // 比较域名后缀
$moreinfo = $moreinfoname; // 遇到匹配项就立即结束循环
break;
}

if ( $moreinfo && $address) { // 跳转到WHOIS主机
header(Location:
exit();
}
else {
echo "<form action=$PHP_SELF method=post>
请输入域名:<input name=address>
<input type=submit></form>";
}

?>

<html>

<head>
<title>whois tool</title>
</head>

<body>

<p>网络技术主管汉化解释</a>.</p>

<hr />
<address>

</body>

</html>

<?php
highlight_file("whois.php");
?>



评论


亲,登录后才可以留言!