- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
if(!empty($_POST))
{
$url = trim($_POST['url']);
if((substr($url, 0, 7)) == "http://") $url = str_replace('http://','',$url);
if((substr($url, 0, 4)) == "www.") $url = str_replace('www.','',$url);
if(strpos($url,'/')>0) list($url) = explode('/',$url);
$domain = array(
array("ac","whois.nic.ac","No match"),
array("ac.cn","whois.cnnic.net.cn","no matching record"),
array("ac.jp","whois.nic.ad.jp","No match"),
array("ac.uk","whois.ja.net","No such domain"),
array("ad.jp","whois.nic.ad.jp","No match"),
array("adm.br","whois.nic.br","No match"),
array("adv.br","whois.nic.br","No match"),
array("aero","whois.information.aero","is available"),
array("ag","whois.nic.ag","Not found"),
array("agr.br","whois.nic.br","No match"),
array("ah.cn","whois.cnnic.net.cn","No entries found"),
array("al","whois.ripe.net","No entries found"),
array("am","whois.amnic.net","No match"),
array("am.br","whois.nic.br","No match"),
array("arq.br","whois.nic.br","No match"),
array("at","whois.nic.at","nothing found"),
array("au","whois.aunic.net","No Data Found"),
array("art.br","whois.nic.br","No match"),
array("as","whois.nic.as","Domain Not Found"),
array("asn.au","whois.aunic.net","No Data Found"),
array("ato.br","whois.nic.br","No match"),
array("av.tr","whois.nic.tr","Not found in database"),
array("az","whois.ripe.net","no entries found"),
array("ba","whois.ripe.net","No match for"),
array("be","whois.geektools.com","No such domain"),
array("bg","whois.digsys.bg","does not exist"),
array("bio.br","whois.nic.br","No match"),
array("biz","whois.biz","Not found"),
array("biz.tr","whois.nic.tr","Not found in database"),
array("bj.cn","whois.cnnic.net.cn","No entries found"),
array("bel.tr","whois.nic.tr","Not found in database"),
array("bmd.br","whois.nic.br","No match"),
array("br","whois.registro.br","No match"),
array("by","whois.ripe.net","no entries found"),
array("ca","whois.cira.ca","Status: AVAIL"),
array("cc","whois.nic.cc","No match"),
array("cd","whois.cd","No match"),
array("ch","whois.nic.ch","We do not have an entry"),
array("cim.br","whois.nic.br","No match"),
array("ck","whois.ck-nic.org.ck","No entries found"),
array("cl","whois.nic.cl","no existe"),
array("cn","whois.cnnic.net.cn","No entries found"),
array("cng.br","whois.nic.br","No match"),
// ...
// Поскипана ещё куча таких же строк
);
$end = substr($url, strpos($url, ".") + 1);
for($i = 0; $i < count($domain); $i++)
{
if($domain[$i][0] == $end)
{
$whois = $domain[$i][1];
$no_found = $domain[$i][2];
break;
}
}
if(empty($whois)) exit("Нет данных по этому домену");
@$fp = fsockopen($whois, 43) or exit ("Ошибка при обращении к серверу");
fputs($fp, "$url\r\n");
$answer = "";
while(!feof($fp))
{
$answer .= "<tr><td>".fgets($fp,128)."</tr></td>";
}
fclose($fp);
$answer = preg_replace("/".$no_found."/is", "Домен не найден.", $answer);
echo "<h2>Информация о $url</h2>";
echo "<table width=80%>";
echo $answer;
echo "</table>";
}