全球主机交流论坛

标题: 谁发一个可用的PHP版whois查询程序? [打印本页]

作者: 气味    时间: 2014-6-7 11:28
标题: 谁发一个可用的PHP版whois查询程序?
上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.
--------------------------------------


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


作者: 2014    时间: 2014-6-7 11:32
   phpeasywhois
作者: xen    时间: 2014-6-7 11:33
20块钱给你现做一个
作者: 气味    时间: 2014-6-7 11:42
2014 发表于 2014-6-7 11:32
phpeasywhois

是有叫这个名的现成程序?
作者: Zoplor    时间: 2014-6-7 11:52
本帖最后由 Zoplor 于 2014-6-7 12:14 编辑

  我上次做了个  拿去试试[attach]59098[/attach]
作者: 气味    时间: 2014-6-7 12:02
Zoplor 发表于 2014-6-7 11:52
我上次做了个  拿去试试

1K 下载下来一看是 直接用1api的啊
作者: Zoplor    时间: 2014-6-7 12:03
气味 发表于 2014-6-7 12:02
1K 下载下来一看是 直接用1api的啊

1api查询很全的啦     或者你可以按照我的思路调用linux的whois命令查  
作者: 我是大傻瓜    时间: 2014-6-7 12:04
调用43端口查吧,虽然有时候会查不出
作者: 气味    时间: 2014-6-7 12:05
Zoplor 发表于 2014-6-7 12:03
1api查询很全的啦     或者你可以按照我的思路调用linux的whois命令查
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.

   Domain Name: GODADDY.COM
   Registrar: GODADDY.COM, LLC
   Whois Server: whois.godaddy.com
   Referral URL: http://registrar.godaddy.com
   Name Server: A1-245.AKAM.NET
   Name Server: A11-64.AKAM.NET
   Name Server: A20-65.AKAM.NET
   Name Server: A6-66.AKAM.NET
   Name Server: A8-67.AKAM.NET
   Name Server: A9-67.AKAM.NET
   Name Server: CNS1.GODADDY.COM
   Name Server: CNS2.GODADDY.COM
   Name Server: CNS3.GODADDY.COM
   Status: clientDeleteProhibited
   Status: clientRenewProhibited
   Status: clientTransferProhibited
   Status: clientUpdateProhibited
   Status: serverDeleteProhibited
   Status: serverTransferProhibited
   Status: serverUpdateProhibited
   Updated Date: 09-apr-2014
   Creation Date: 02-mar-1999
   Expiration Date: 01-nov-2021

>>> Last update of whois database: Sat, 07 Jun 2014 04:07:22 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.


一样  还是查不出 godaddy.com enom.com …… 的信息
作者: Zoplor    时间: 2014-6-7 12:07
气味 发表于 2014-6-7 12:05
一样  还是查不出 godaddy.com enom.com …… 的信息

我下午帮你重写个调用whois命令的
作者: 气味    时间: 2014-6-7 12:10
Zoplor 发表于 2014-6-7 12:07
我下午帮你重写个调用whois命令的

http://1api.net/whois.php?query=enom.com&btnsearch.x=0&btnsearch.y=0

他们现在这个好像可以查全了
作者: Zoplor    时间: 2014-6-7 12:13
气味 发表于 2014-6-7 12:10
http://1api.net/whois.php?query=enom.com&btnsearch.x=0&btnsearch.y=0

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

一直可以查全,我只是正则匹配第一对<pre></pre>标签里面的内容,你可以改写一下
作者: 气味    时间: 2014-6-7 12:22
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过渡下,老外的服务器有点慢。
另外当输入错误,或者域名未注册,域名不能查询……
这些情况能否设置?
作者: Zoplor    时间: 2014-6-7 12:34
气味 发表于 2014-6-7 12:22
第二个匹配的是啥

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

最开始试过AJAX,对这玩意不熟 半吊子,所以放弃了
最简单的方法就是调用linux的whois命令
这个是调用whois命令的版本 (, 下载次数: 126)
作者: 气味    时间: 2014-6-7 12:42
Zoplor 发表于 2014-6-7 12:34
最开始试过AJAX,对这玩意不熟 半吊子,所以放弃了
最简单的方法就是调用linux的whois命令
这个是调用who ...
Warning:  system() has been disabled for security reasons in whois.php on line 63



作者: Kslr    时间: 2014-6-7 12:57
气味 发表于 2014-6-7 12:42

为了安全,一般这个函数是被禁用的。在php.ini找到disable_functions项,删除其中的system函数
作者: 气味    时间: 2014-6-7 12:59
Kslr 发表于 2014-6-7 12:57
为了安全,一般这个函数是被禁用的。在php.ini找到disable_functions项,删除其中的system函数 ...

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

who.is

作者: 气味    时间: 2014-6-7 21:47
有木有?
作者: 晓白    时间: 2014-6-7 23:46
提示: 作者被禁止或删除 内容自动屏蔽
作者: thinkxen    时间: 2014-6-7 23:52
感谢14楼




欢迎光临 全球主机交流论坛 (https://d.168530.xyz/) Powered by Discuz! X3.4