Solved

is there a fucntion to check if a domain is registered

Posted on 2007-12-06
3
627 Views
Last Modified: 2008-02-01
i want to check if a domain is registered, can php do this?
0
Comment
Question by:markmchugh
3 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 20420454
Hi markmchugh,

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

hope that helps,

ZOPPO
0
 
LVL 24

Accepted Solution

by:
glcummins earned 500 total points
ID: 20420534
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
 
LVL 82

Expert Comment

by:hielo
ID: 20420597
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now