Webmaster общности: Predpriemach.com | SearchEngines.bg

    WHOIS домейн проверка

    Автор: ReCoNeC7eD

    Проверете дали домейна е свободен за регистрация с този код .

    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>

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

    Оставете коментар