WHOIS домейн проверка
24-09-2009
Проверете дали домейна е свободен за регистрация с този код .

index.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <?php
ob_start();
?>
<html>

<head>
<title>Whois</title>
<style>
body, td, input {
font-family: verdana;
font-size: 11px;
}

form {
margin: 0px;
}

a {
color: black;
text-decoration: none;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>

<body>

<?php
$whois = array();
$whois['bg'] = array("whois.crsnic.net", 43, "{domein}.bg", "false");
$whois['eu'] = array("whois.crsnic.net", 43, "{domein}.eu", "Свободен");
$whois['eu'] = array("whois.crsnic.net", 43, "{domein}.eu", "Свободен");
$whois['de'] = array("whois.crsnic.net", 43, "{domein}.de", "Свободен");
$whois['name'] = array("whois.crsnic.net", 43, "{domein}.name", "Свободен");
$whois['nl'] = array("whois.domain-registry.nl", 43, "{domein}.nl", "is free");
$whois['be'] = array("whois.dns.be", 43, "{domein}", "FREE");
$whois['com'] = array("whois.nsiregistry.net", 43, "{domein}.com", "No match for");
$whois['net'] = array("whois.nsiregistry.net", 43, "{domein}.net", "No match for");
$whois['org'] = array("whois.publicinterestregistry.net", 43, "{domein}.org", "NOT FOUND");
$whois['info'] = array("whois.afilias.info", 43, "{domein}.info", "NOT FOUND");
$whois['biz'] = array("whois.biz", 43, "{domein}.biz", "Not found:");
$whois['me'] = array("WHOIS.meregistry.net", 43, "{domein}.me", "NOT FOUND");
$whois['nu'] = array("whois.publicinterestregistry.net", 43, "{domein}.nu", "NO MATCH");
$whois['cc'] = array("whois.crsnic.net", 43, "{domein}.eu", "Свободен");

function whois($whois)
{
list ($server, $poort, $domein, $vrij) = $whois;
$domein = str_replace("{domein}", $_GET['domein'], $domein);

$fp = fsockopen($server, $poort);

if($fp)
{
fputs($fp, $domein."\r\n");

while(!feof($fp))
{
$data .= fread($fp, 1000);
}

fclose($fp);
}
else
{
$data = "error";
}

return $data;
}

if ($_REQUEST['submit'])
{
header("location:?domein=".$_POST['domein']);
}
elseif (!empty($_GET['domein']))
{
if (!empty($_GET['ext']))
{
echo "<pre>".whois($whois[$_GET['ext'] ])."</pre>".
"<br>".
"&raquo; <a href=\"?domein=".$_GET['domein']."\">Обратно </a>";
}
else
{
echo "<table>".
"<tr>".
"<td><u>Whois Проверка :</u></td>".
"<td>&nbsp;</td>".
"</tr>";

foreach ($whois as $ext => $value)
{
list ($server, $poort, $domein, $vrij) = $value;

$data = whois($value);

if (!ereg($vrij, $data))
{
$status = "<a href=\"?domein=".$_GET['domein']."&ext=".$ext."\"><font color=\"red\">зает </font></a>";
}
elseif ($data == "error")
{
$status = "<font color=\"red\">Грешка</font>";
}
else
{
$status = "<font color=\"darkgreen\">Свободен</font>";
}

echo "<tr>".
"<td>".$_GET['domein'].".".$ext."</td>".
"<td align=\"right\">".$status."</td>".
"</tr>";
}

echo "</table>".
"<br>".
"&raquo; <a href=\"index.php\">Отново</a>";
}
}
else
{
?>
<form method="post">
<table>
<tr>
<td>Домейн без разширение:</td>
<td><input type="text" name="domein"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" name="submit" value="Провери сега !"></td>
</tr>
</table>
</form>
<?php
}
?>

</body>

</html>


Можете да променяте кода както искате и да го копирате !


/ Трябва да сте регистриран за да напишете коментар /
От: ReCoNeC7eD
14:35 26-09-2009
Забравих да кажа че е без дизайн
От: amarok
1:11 30-09-2009
Не работи ;д
От: admin
2:08 30-09-2009
Аз го тествах и работи.
От: vankata
17:37 04-10-2009
Брави много хубаВ скрипт :)
От: koko92_national
22:20 04-10-2009
Харесва ми.
От: Insident
15:38 08-10-2009
И на мене ми харесва браво
От: kickme
17:16 10-09-2010
Не работи
От: LuBaTa
2:35 02-09-2011
Warning: Cannot modify header information - headers already sent by (output started at /home/goprobge/public_html/proverka/chekdomain.php:1) in /home/goprobge/public_html/proverka/chekdomain.php on line 73
1