How would I go about checking if a domain name is registered? I was thinking about checking if it has a corresponding IP but it doesn’t seem to work as well as I had hoped. Is there a solution in either PHP or Python that can check?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“Registered” doesn’t mean “assigned an IP address”. To know whether a domain name is registered, you’ll need to do a whois query.
For Python, there’s pywhois, but from its web site it seems somewhat immature. Also see this SO question.
For PHP, there’s… surprise… phpwhois.