'.$ext[$i].'
'; else $list_ext.='
'.$ext[$i].'
'; } return $list_ext.'
 
Check all
'; } else { return '
List extension not available.
'; } } function whois($domain,$ext,$showInfo=false) { $errMess = ''; if(empty($domain)) { $errMess .= 'You must enter domain name to check.'; } if(!eregi("^([[:alnum:]-])+$",$domain)) { $errMess .= "
  • Domain name contain alphabet, number & dash character only.
  • "; } if(strpos($domain,'.')===true) { $errMess .= "
  • Domain name contain alphabet, number & dash character only.
  • "; } if(strlen($domain>255)) { $errMess .= "
  • Domain string must less than 255 characters
  • "; } if(!empty($errMess)) { echo ""; } else { $requestURI = "http://www.matbao.net/whoisXML.aspx?domain=".$domain.$ext; $responseData = file_get_contents($requestURI); $message = ''; //find tag to get description $itemPattern = "/(.*)<\/item>/s"; if(preg_match($itemPattern, $responseData, $itemMatches)) { //check available. if True: taken, False: available $availablPattern = "/(.*)<\/avaiable>/"; if($showInfo) { //get domain infomations $descriptionPattern = "/(.*)<\/description>/s"; $message = ''; if(preg_match($descriptionPattern, $itemMatches[1], $matches)) { $message .= '

    Domain infomations

    '; $message .= $matches[1]; echo $message; die(); } } if(preg_match($availablPattern, $itemMatches[1], $matches)) { if($matches[1] === 'True') { echo "
    $domain$ext This domain has taken. (whois)
    "; } else { echo "
    $domain$ext This domain has available.
    "; } } $fp=fopen("checked_domain.txt","a"); fwrite($fp, $domain.$ext."\t".date("H:i:s - d/m/Y")."\n"); fclose($fp); } else { echo 'Data corrupted.'; } } } if(isset($_GET['act']) && $_GET['act']=='check') { $domain = $_GET['domain']; $ext = substr($_GET['ext'],0,strlen($_GET['ext'])-1); $ext = split(',', $ext); if(!empty($ext)) { for($i=0;$i'; } } else { echo 'Choose at least domain extension to check.'; } } elseif($_GET['act']=='detail') { list($domain, $ext) = explode('.', $_GET['domain']); whois($domain, ".$ext", true); } elseif($_GET['act']=='checked_domain') { $f="checked_domain.txt"; @$ft=fopen($f,"r"); if(!$ft) { echo "Domain list is empty now."; exit; } else { $html= "
      "; while (!feof($ft)) { $list=fgets($ft,1000); if($list!='') { $list = str_replace("\t", '        ', $list); $html.="
    1. $list
    2. "; } } echo $html.'
    '; } } else { ?> Coded by Đỗ Nam Khánh (karate_hn1984) | code whois domain, code kiem tra domain, code kiểm tra tên miền, domain, ajax, prototype, jquery, php, donamkhanh, do nam khanh, karate_hn1984

    Check domain v3.0 v3.1

    Checking... Getting data, please wait...
    1. Enter your domain: Max length255 characters
     
    2. Choose domain extension:

     

    Note: Enter domain only, do not enter http:// or www prefix and domain extension (.vn, .com, .info...).

    Fixed:

    1. Check valid domain.
    2. Check domain length.
    3. Ignore if error found.

    Domains Checked:
     
    © 2006 - by Đỗ Nam Khánh (karate_hn1984)