Bulk domain availability checker script

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
)


Liked It? Get Free updates in your Email

Delivered by feedburner

2 thoughts on “Bulk domain availability checker script

  1. heba3030
    #

    thanks very much for your code
    thanks man

    Reply
  2. Sarah McDonough
    #

    very handy code for checking bulk domain names – thank you!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *