Home จดโดเมน
ตรวจสอบโดเมนแนม PDF Print E-mail
Written by administator   
Thursday, 05 January 2012 15:33
serverList as $value) { if ($value['check'] == true) $checked=" checked "; else $checked = " "; echo ''; $i++; if ($i > 4) { $i = 0; echo ''; } } ?>
Enter a domain name:
www.
Select an extension:
.'.$value['top'].'

showHeader(); if (!isset($_POST['submitBtn'])){ $this->showWhoisForm(); } else { $domainName = (isset($_POST['domain'])) ? $_POST['domain'] : ''; for ($i = 0; $i < sizeof($this->serverList); $i++) { $actTop = "top_".$this->serverList[$i]['top']; $this->serverList[$i]['check'] = isset($_POST[$actTop]) ? true : false; } // Check domains only if the base name is big enough if (strlen($domainName)>2){ echo ''; echo ''; for ($i = 0; $i < sizeof($this->serverList); $i++) { if ($this->serverList[$i]['check']){ $this->showDomainResult($domainName.".".$this->serverList[$i]['top'], $this->serverList[$i]['server'], $this->serverList[$i]['response']); } } echo '

Result

'; } $this->showWhoisForm(); } $this->showFooter(); } function showDomainResult($domain,$server,$findText){ if ($this->tr == 0){ $this->tr = 1; $class = " class='tr2'"; } else { $this->tr = 0; $class = ""; } if ($this->checkDomain($domain,$server,$findText)){ echo "$domainAVAILABLE"; } else echo "$domainTAKEN"; } function checkDomain($domain,$server,$findText){ $con = fsockopen($server, 43); if (!$con) return false; // Send the requested doman name fputs($con, $domain."\r\n"); // Read and store the server response $response = ' :'; while(!feof($con)) { $response .= fgets($con,128); } // Close the connection fclose($con); // Check the response stream whether the domain is available if (strpos($response, $findText)){ return true; } else { return false; } } } ?>

Last Updated on Thursday, 05 January 2012 16:52
 
Copyright © 2012 Idea4web.com รับออกแบบเว็บไซต์ เว็บไซต์สำเร็จรูปราคาถูก. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.