Нашёл какой то авторский модуль по проверке доменов, на одном единственном сайте, больше ни где инфы про него не нашёл. Кое-что удалось доработать самому, но никак не получается сделать проверку доменов .рф, основной код модуля -
<?phpclass domain_to_check { var $name; var $whois_server; var $whois_server_answer; var $break_checkbox; var $show; // конструктор function domain_to_check($name_c,$whois_server_c,$whois_server_answer_c,$break_c,$show_c) { $this->name = $name_c; $this->whois_server = $whois_server_c; $this->whois_server_answer = $whois_server_answer_c; $this->break_checkbox = $break_c; $this->show = $show_c; } //показываем чекбокс function showcheckbox() { if ($this->show == true) { echo "<div><input type=\"checkbox\" name=\"".$this->name."\" id=\"".$this->name."\"><label for=\"".$this->name."\"><span>".$this->name."</span></label></div>"; if ($this->break_checkbox == true) echo ""; } } //проверяем домен function checkDomain($domain) { // Состоит ли строка только из латинских букв, цифр и "-", длиной от 2 до 30 символов $domain = strip_tags($domain); if (ereg("^[а-яА-Яa-zA-Z0-9-]{2,30}$",$domain)) { $domain = $domain.".".$this->name; $availstr = "<a href=\"/\" target=\"_blank\"><b>Можно зарегистрировать</b></a>"; $con = fsockopen($this->whois_server, 43); if (!$con) return false; fputs($con, $domain."\r\n"); $response = ' :'; while(!feof($con)) { $response .= fgets($con,128); } fclose($con); if (strpos($response, $this->whois_server_answer)) { echo "<div style=\"margin-bottom:4px\">$domain $availstr</div>"; } else { echo "<div style=\"margin-bottom:4px\">$domain <b>ЗАНЯТ</b></div>"; } } } }$newdomain = array();$newdomain[0] = new domain_to_check("com","whois.crsnic.net","No match for",false,true); $newdomain[1] = new domain_to_check("ru","whois.ripn.net","No entries found",false,true);$newdomain[2] = new domain_to_check("su","whois.ripn.net","No entries found",false,true);$newdomain[3] = new domain_to_check("pro","whois.registrypro.pro","NOT FOUND",false,true);$newdomain[4] = new domain_to_check("net","whois.crsnic.net","No match for",false,true);$newdomain[5] = new domain_to_check("info","whois.afilias.net","NOT FOUND",false,true);$newdomain[6] = new domain_to_check("org","whois.publicinterestregistry.net","NOT FOUND",false,true);$newdomain[7] = new domain_to_check("biz","whois.neulevel.biz","Not found:",true,true);$newdomain[8] = new domain_to_check("asia","whois.nic.asia","NOT FOUND",false,true);$newdomain[10] = new domain_to_check("cc","whois.nic.cc","No match",false,true);$newdomain[11] = new domain_to_check("us","whois.nic.us","Not found:",false,true);$newdomain[12] = new domain_to_check("tv","whois.nic.tv","No match for",true,true);$newdomain[13] = new domain_to_check("eu","whois.eu","AVAILABLE",false,true);$newdomain[14] = new domain_to_check("in","whois.inregistry.net","NOT FOUND",false,true);$newdomain[15] = new domain_to_check("mobi","whois.dotmobiregistry.net","NOT FOUND",false,true);$newdomain[16] = new domain_to_check("nl","whois.domain-registry.nl","free",false,true);$newdomain[17] = new domain_to_check("ca","whois.cira.ca","AVAIL",true,true);$newdomain[18] = new domain_to_check("bz","whois2.afilias-grs.net","NOT FOUND",false,true);$newdomain[19] = new domain_to_check("mn","whois.nic.mn","Domain not found",false,true);$newdomain[20] = new domain_to_check("ws","whois.worldsite.ws","No match for",true,true);$newdomain[21] = new domain_to_check("me","whois.nic.me","NOT FOUND",false,true);$newdomain[22] = new domain_to_check("tel","whois.nic.tel","Not found",false,true);$newdomain[23] = new domain_to_check("travel","whois.nic.travel","Not found",false,true);$newdomain[24] = new domain_to_check("pw","whois.nic.pw","DOMAIN NOT FOUND",false,true);$newdomain[25] = new domain_to_check("рф","whois.ripn.net","No entries found",false,true);$label = "Доменное имя";$buttontext = "Проверить";$resulttext = "Результат";$checkall = "Проверить все домены";?> <form action=" " method="post" name="domain" id="domain"> <div class="domeni"><input class="poledomena" name="domainname" type="text" placeholder="domen"/> <?php// выводим чекбоксы foreach ($newdomain as $value) { $value->showcheckbox(); } ?> </div> <input style="margin:7px;" type="submit" name="submitBtn" value="<?php echo $buttontext ?>"/> </form> <?php if (isset($_POST['submitBtn'])) { $domainbase = (isset($_POST['domainname'])) ? $_POST['domainname'] : ''; if (strlen($domainbase)>0) { ?> <div id="caption" style="margin-top:8px; margin-bottom:8px; font-weight:bold"><?php echo $resulttext ?> :</div> <?php foreach ($newdomain as $value) { // если была отмечена галочка, то проверяем домен if (isset($_POST[$value->name])) $value->checkDomain($domainbase); } } }?>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
Rudiarius
Нашёл какой то авторский модуль по проверке доменов, на одном единственном сайте, больше ни где инфы про него не нашёл. Кое-что удалось доработать самому, но никак не получается сделать проверку доменов .рф, основной код модуля -
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.