全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 2415|回复: 19
打印 上一主题 下一主题

谁发一个可用的PHP版whois查询程序?

[复制链接]
跳转到指定楼层
1#
发表于 2014-6-7 11:28:07 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
上chinaz和admin5找了半天,发现好多域名都查询不了。

查 godaddy.com 出来结果:
--------------------------------
Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

Aborting search 50 records found .....
GODADDY.COM, LLC                                             whois.godaddy.com
GODADDY.COM, INC.                                                            
GODADDY.COM.3KINGSTRAVEL.NET
GODADDY.COM.4XESCORT.COM
GODADDY.COM.ADASAPHOTOGRAPHICART.COM
GODADDY.COM.ADDITIONALEARNINGS-TIPS.COM
GODADDY.COM.AFRICENTREPRENEURS.COM
GODADDY.COM.ALEADINGLIMO.COM
GODADDY.COM.ALEXANDREAREINA.COM
GODADDY.COM.ALLINSU-RANCE.COM
GODADDY.COM.AND.ALEX.FUCKED.BY.WWW.DNDIALOG.COM
GODADDY.COM.ARDENTAXI.COM
GODADDY.COM.ARIESRISK.COM
GODADDY.COM.ARMANIART.COM
GODADDY.COM.ARTSDESIGNGALLERY.COM
GODADDY.COM.AU
GODADDY.COM.BANGALORESRESTAURANTS.COM
GODADDY.COM.BERNADETTEHAROLD.COM
GODADDY.COM.BUYBESTLINKS.COM
GODADDY.COM.CHILDHOODTRAUMARECOVERY.COM
GODADDY.COM.CHRISTAMELNYKHINES.COM
GODADDY.COM.CLAUSENASSOCIATES.COM
GODADDY.COM.CLIFFYCELLS.COM
GODADDY.COM.COASTLINE-FM.COM
GODADDY.COM.DCSCHOOLHUB.COM
GODADDY.COM.DYNAMICVALUES.COM
GODADDY.COM.EENGURRA.COM
GODADDY.COM.ENVIROWOLF.COM
GODADDY.COM.ERICAMDESIGNS.COM
GODADDY.COM.EZGRAPHICSLOGOS.COM
GODADDY.COM.FLETCHERANDFLETCHERPHOTOGRAPHY.COM
GODADDY.COM.FLORIDASURETY.COM
GODADDY.COM.GDDAS.COM
GODADDY.COM.GENUINETIMEPIECE.COM
GODADDY.COM.GGONYA.NET
GODADDY.COM.GIGSPICK.COM
GODADDY.COM.GINERREALESTATE.COM
GODADDY.COM.GLOBALEMAC.COM
GODADDY.COM.GLORY-HAIRSALON.COM
GODADDY.COM.GRAYRAYNEFABRICS.COM
GODADDY.COM.HOTBIKINIRATER.COM
GODADDY.COM.HYUNSIKYOO.COM
GODADDY.COM.INDYMETROWOMAN.COM
GODADDY.COM.ISLANDTRAMS.COM
GODADDY.COM.IXCANADESIGNS.COM
GODADDY.COM.J4JATT.COM
GODADDY.COM.JENNYSCRUISES.COM
GODADDY.COM.JESSICABOAL.COM
GODADDY.COM.JUSTCHILLINUNO.COM
GODADDY.COM

To single out one record, look it up with "xxx", where xxx is one of the
records displayed above. If the records are the same, look them up
with "=xxx" to receive a full display for each record.

>>> Last update of whois database: Sat, 07 Jun 2014 03:29:31 UTC <<<

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar.  Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability.  VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.

------------------------------------------

查 enom.com 出来结果:
----------------------------------------------------------
Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

ENOM.COM.RESPECTED.BY.WWW.DNDIALOG.COM
ENOM.COM

To single out one record, look it up with "xxx", where xxx is one of the
records displayed above. If the records are the same, look them up
with "=xxx" to receive a full display for each record.

>>> Last update of whois database: Sat, 07 Jun 2014 03:30:46 UTC <<<

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar.  Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability.  VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
--------------------------------------


有没有查询能靠谱点的,发一个共享之!

19#
发表于 2014-6-7 23:46:59 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
17#
 楼主| 发表于 2014-6-7 12:59:29 | 只看该作者
Kslr 发表于 2014-6-7 12:57
为了安全,一般这个函数是被禁用的。在php.ini找到disable_functions项,删除其中的system函数 ...

快去写一个彪悍的whois程序来分享

who.is
16#
发表于 2014-6-7 12:57:50 | 只看该作者

为了安全,一般这个函数是被禁用的。在php.ini找到disable_functions项,删除其中的system函数
15#
 楼主| 发表于 2014-6-7 12:42:48 | 只看该作者
Zoplor 发表于 2014-6-7 12:34
最开始试过AJAX,对这玩意不熟 半吊子,所以放弃了
最简单的方法就是调用linux的whois命令
这个是调用who ...
Warning:  system() has been disabled for security reasons in whois.php on line 63


14#
发表于 2014-6-7 12:34:35 | 只看该作者
气味 发表于 2014-6-7 12:22
第二个匹配的是啥

另外能不能将查询结果未展现前加一个loading过渡下,老外的服务器有点慢。

最开始试过AJAX,对这玩意不熟 半吊子,所以放弃了
最简单的方法就是调用linux的whois命令
这个是调用whois命令的版本 whois.zip (900 Bytes, 下载次数: 126)
13#
 楼主| 发表于 2014-6-7 12:22:16 | 只看该作者
Zoplor 发表于 2014-6-7 12:13
一直可以查全,我只是正则匹配第一对标签里面的内容,你可以改写一下
$get_query_url = "http://1api.net/whois.php?query=$get_name";
$get_info = file_get_contents($get_query_url);
preg_match ('|<pre>(.+?)<\/pre>|is',$get_info,$opi);
$str_match = str_replace('%','',$opi[1]);
echo "<pre>$str_match</pre>";


第二个匹配的是啥

另外能不能将查询结果未展现前加一个loading过渡下,老外的服务器有点慢。
另外当输入错误,或者域名未注册,域名不能查询……
这些情况能否设置?
12#
发表于 2014-6-7 12:13:45 | 只看该作者
气味 发表于 2014-6-7 12:10
http://1api.net/whois.php?query=enom.com&btnsearch.x=0&btnsearch.y=0

他们现在这个好像可以查全了 ...

一直可以查全,我只是正则匹配第一对<pre></pre>标签里面的内容,你可以改写一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-14 15:57 , Processed in 0.073121 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表