检查域名是否被注册 [英] Checking if a domain name is registered
本文介绍了检查域名是否被注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何注册域名?我正在考虑检查它是否具有相应的IP,但是似乎没有像我所希望的那样工作。是否有可以检查的PHP或Python解决方案?
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?
推荐答案
注册并不意味着分配了一个IP地址。要知道域名是否已注册,您需要执行whois查询。
"Registered" doesn't mean "assigned an IP address". To know whether a domain name is registered, you'll need to do a whois query.
对于Python,有 pywhois ,但从它的网站来看,似乎有些不成熟。另请参阅此SO问题。
For Python, there's pywhois, but from its web site it seems somewhat immature. Also see this SO question.
对于PHP,有...惊喜... phpwhois 。
For PHP, there's... surprise... phpwhois.
这篇关于检查域名是否被注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文