0

How to Check if a domain is available or Not

We can check domain’s DNS record to verify valid domain. We can check if growwebsite.com is there in DNS record by using checkdnsrr function. This function will returns True if available and returns False if not available.

 

Syntax :

checkdnsrr (host, type)

This function may not work properly in Windows platform ( Older than PHP 5.3 ).

Argument :

NameDescription
hosthost may either be the IP address in dotted-quad notation or the host name.
typetype may be any one of: A, MX, NS, SOA, PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.

Here is the simple code to check DNS records.

The Output Will Be Valid Domain

And with checkdnsrr() you can also check a valid email address by checking its host to escape dummy email address that are usually filled by BOTs and guest Users.

The Output Will Be Valid Email

Hope it will Help You and please like my facebook page :

and make me proud.By the way if you face any problem then let me know in comment section below

Leave a Reply

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