Today I would like to share a very simple PHP code snippet that lets you know if a given specific domain is registered or available for purchase or not.To check if a domain is registered or not we will use the PHP’s built in function called
checkdnsrr().This function searches for the DNS records of the given domain and if they are not available that means the domain is not registered and it is available.
Here is a simple script that you can use:
Output is arjunphp.com is already registered. just you need to pass the domain name to the function.
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.