is there a fucntion to check if a domain is registered

i want to check if a domain is registered, can php do this?
markmchughAsked:
Who is Participating?
 
glcumminsConnect With a Mentor Commented:
For the most complete results, you can use your PHP script to access a webpage such as http://www.whois.net/whois_new.cgi?d=zamuta&tld=com (Insert the desired domain in the place of 'zamuta' and 'com'. You can use cUrl or fopen to get the contents of the page. Then parse the results to determine if the domain is registered.

Zoppo's comment will be much easier to use. However, it will return inaccurate results if the domain is registered, but not yet listed in DNS.
0
 
ZoppoCommented:
Hi markmchugh,

you can try to get the IP address using 'gethostbyname' ...

hope that helps,

ZOPPO
0
 
hieloCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.