Pure php based domain availability checker script. This script can check domain availability without whois lookup. And supports all TLDs over internet
How it works?
Each registered domain has its own ns (name server) entry. Which can be checked using dns_get_record() function. In this script we check whether queried domain has it ns entry or not if we found it then it is not available.
PHP function to check domain availability
function domain_availability($domains){ foreach ($domains as $domain) { $ns= @dns_get_record($domain,DNS_NS); if(count($ns)) { $rs[$domain]=0; } else { $rs[$domain]=1; } } return $rs; }
Uses
array domain_availability(array $domainlist)
function takes array of domains as parameter and returns array which has domain name as key and value ( 1 for available and 0 for not available )
Example
$domains=array("google.com","hsghjgsy.org","jsdhjs.es","aajjks.eu","sjdjsd.in"); $rs=domain_availability($domains); print_r($rs);
Output
Array
(
[google.com] => 0
[hsghjgsy.org] => 1
[jsdhjs.es] => 1
[aajjks.eu] => 1
[sjdjsd.in] => 1
)
thanks very much for your code
thanks man
very handy code for checking bulk domain names – thank you!
Thank you.
I want check ajax with jquery, but unknown
Sometimes, domains that are not available are shown as available by this script. It isn’t 100% reliable.
Hello I know the post is old but how can I get return of reverse dns.
Searching for a domain or ip in a form.
Taking reverse dns example
.in-addr.arpa rdns.domain.com
Could help
use gethostbyaddr(IP-TO-LOOKUP) php function for reverse dns lookup