# phpWhois - base class to do whois queries with PHP
This package contains a Whois (RFC954) library for PHP. It allows
a PHP program to create a Whois object, and obtain the output of
a whois query with the Lookup function.
The response is an array containing, at least, an element 'rawdata',
containing the raw output from the whois request.
In addition, if the domain belongs to a registrar for which a special
handler exists, the special handler will parse the output and make
additional elements available in the response. The keys of these
additional elements are described in the file HANDLERS.
It fully supports IDNA (internationalized) domains names as
defined in RFC3490, RFC3491, RFC3492 and RFC3454.
It also supports ip/AS whois queries which are very useful to trace
SPAM. You just only need to pass the doted quad ip address or the
AS (Autonomus System) handle instead of the domain name. Limited,
non-recursive support for Referral Whois (RFC 1714/2167) is also
provided.
### Requirements
phpWhois requires PHP 4.3.0 or better with OpenSSL support to
work properly. Without SSL support you will not be able to
query domains which do not have a whois server but that have
a https based whois. Also, you can run it in lower PHP versions
but without timeout control. phpWhois will not work with PHP
versions below 4.1.0
### Installation
Basically, untar the distribution somewhere outside your server's
document root and make sure the directory is listed in 'include_path'
in your php.ini file, server configuration or in an .htaccess file.
If you want to test it using a web browser just copy example.php ,
example.html and whois.icon.png anywhere on your server's document
root and try it.
phpWhois is not a PHP aplication is a class that can be used in
applications. There is no need to make the installation folder
accesible to anyone but PHP, nevertheless you can install it inside
your server's document root if you like, it will work without
problems or security risks.
### Example usage
See example.php
```php
include 'whois.main.php';
$whois = new Whois();
$query = 'example.com';
$result = $whois->Lookup($query,false);
echo '<pre>';
print_r($result);
echo '</pre>';
```
If you provide the domain name to query in UTF-8, then you
must use:
```php
$result = $whois->Lookup($query);
```
If the query string is not in UTF-8 then it must be in
ISO-8859-1 or IDNA support will not work.
### What you can query
You can use phpWhois to query domain names, ip addresses and
other information like AS, i.e, both of the following examples
work:
```php
$whois = new Whois();
$result = $whois->Lookup('example.com');
$whois = new Whois();
$result = $whois->Lookup('62.97.102.115');
$whois = new Whois();
$result = $whois->Lookup('AS220');
```
### Using special whois servers
Some registrars can give special access to registered whois gateways
in order to have more fine control against abusing the whois services.
The currently known whois services that offer special acccess are:
- ripe
The new ripe whois server software support some special parameters
that allow to pass the real client ip address. This feature is only
available to registered gateways. If you are registered you can use
this service when querying ripe ip addresses that way:
```php
$whois = new Whois();
$whois->UseServer('uk', 'whois.ripe.net?-V{version},{ip} {query}');
$result = $whois->Lookup('62.97.102.115');
```
- whois.isoc.org.il
This server is also using the new ripe whois server software and
thus works the same way. If you are registered you can use this service
when querying .il domains that way:
```php
$whois = new Whois();
$whois->UseServer('uk', 'whois.isoc.org.il?-V{version},{ip} {query}');
$result = $whois->Lookup('example.co.uk');
```
- whois.nic.uk
They offer what they call WHOIS2 (see http://www.nominet.org.uk/go/whois2 )
to registered users (usually Nominet members) with a higher amount of
permited queries by hour. If you are registered you can use this service
when querying .uk domains that way:
```php
$whois = new Whois();
$whois->UseServer('uk', 'whois.nic.uk:1043?{hname} {ip} {query}');
$result = $whois->Lookup('example.co.uk');
```
This new feature also allows you to use a different whois server than
the preconfigured or discovered one by just calling whois->UseServer
and passing the tld and the server and args to use for the named tld.
For example you could use another whois server for .au domains that
does not limit the number of requests (but provides no owner
information) using this:
```php
$whois = new Whois();
$whois->UseServer('au', 'whois-check.ausregistry.net.au');
```
or:
```php
$whois = new Whois();
$whois->UseServer('be', 'whois.tucows.com');
```
to avoid the restrictions imposed by the .be whois server
or:
```php
$whois = new Whois();
$whois->UseServer('ip', 'whois.apnic.net');
```
to lookup an ip address at specific whois server (but loosing the
ability to get the results parsed by the appropiate handler)
UseServer can be called as many times as necessary. Please note that
if there is a handler for that domain it will also be called but
returned data from the whois server may be different than the data
expected by the handler, and thus results could be different.
### Getting results faster
If you just want to know if a domain is registered or not but do not
care about getting the real owner information you can set:
```php
$whois->deep_whois = false;
```
this will tell phpWhois to just query one whois server. For .com, .net
and .tv domains and ip addresses this will prevent phpWhois to ask more
than one whois server, you will just know if the donmain is registered
or not and which is the registrar but not the owner information.
### UTF-8
PHPWhois will assume that all whois servers resturn UTF-8 encoded output,
if some whois server does not return UTF-8 data, you can include it in
the `NON_UTF8` array in whois.servers.php
### Notes
There is an extended class called "whois.utils.php" which contains a
debugging function called showObject(), if you showObject($result)
it will output the total layout of the returned object to the
web browser.
The latest version of the package and a demo script resides at
http://phpwhois.sourceforge.net/
There is also be an article describing the package on devshed.com
at http://www.devshed.com/Server_Side/PHP/whois/
### Support/Patches
If you're really stuck and can't figure something out, or you want
to contribute an extended class for one of the TLD's, send a PR
or open an issue on GitHub. One of the developers will get around
to applying or responding.
https://github.com/sparc/phpWhois.org
### Credits
- Mark Jeftovic markjr@easydns.com
- David Saez Padros david@ols.es
- Ross Golder ross@golder.org
没有合适的资源?快使用搜索试试~ 我知道了~
服务器/虚拟主机托管/IDC平台WHMCS+HTML模板
共1929个文件
svg:372个
tpl:357个
php:321个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 10 浏览量
2022-04-01
16:18:47
上传
评论
收藏 28.63MB ZIP 举报
温馨提示
现代虚拟主机和WHMCS模板。Kohost是功能强大的易于使用,移动友好,高度可定制的SEO友好模板,并使用最新的Bootstrap构建。它非常适合任何独特的托管,域名和经销商业务公司,并能给您的所有客户和竞争对手留下深刻的印象。具有多个元素的高度可定制的部分,可用于提供网络托管,代理商托管,云托管,域,电子邮件托管,WordPress托管的任何公司。可以选择多种支持。还具有模板的RTL版本和“黑色星期五”报价页面。 主要特点 100%反应灵敏且移动友好 创意首页演示 6个托管页面 3个域页面 3 Balck Friday报价页面 内页总数35+ 包含HTML和WHMCS模板的RTL版本 Gulp管理的二手SCSS 二手倒三角CSS(ITCSS)架构 由节点NPM模块管理 使用PHP的工作联系表 可以将模板用作转销商 域名销售模板 易于定制 使用最新版本的Bootstrap进行构建 干净的代码,格式正确的代码 干净现代的专业设计 兼容跨浏览器 使用过的Google字体 包括的主题图标 非常平滑的过渡效果 W3C 100%验证码 有据可查 专业支持和免费更新
资源详情
资源评论
资源推荐
收起资源包目录
服务器/虚拟主机托管/IDC平台WHMCS+HTML模板 (1929个子文件)
main-rtl.css 1.8MB
main-rtl.min.css 1.8MB
main.css 1.46MB
main.min.css 1.46MB
fontawesome-all.min.css 425KB
fontawesome-all.min.css 425KB
all.css 273KB
all.css 272KB
all.min.css 216KB
all.min.css 216KB
bootstrap.min.css 150KB
bootstrap.min.css 150KB
custom.css 80KB
custom.css 78KB
styles.css 73KB
styles.css 73KB
style.css 62KB
animate.min.css 57KB
animate.min.css 57KB
store.css 56KB
store.css 56KB
style.css 40KB
style.css 40KB
all.css 38KB
all.min.css 30KB
bootstrap-rtl.min.css 24KB
base.css 18KB
base.css 18KB
themify-icons.css 16KB
themify-icons.css 16KB
bootstrap-slider.min.css 9KB
bootstrap-slider.min.css 9KB
magnific-popup.css 7KB
magnific-popup.css 7KB
overrides.css 5KB
overrides.css 5KB
hs.megamenu.css 4KB
hs.megamenu.css 4KB
owl.carousel.min.css 3KB
owl.carousel.min.css 3KB
invoice.css 3KB
invoice.css 3KB
quote.css 2KB
quote.css 2KB
owl.theme.default.css 1KB
owl.theme.default.css 1KB
style.css 818B
style.css 818B
oauth.css 817B
oauth.css 817B
style.css 237B
style.css 237B
.DS_Store 18KB
.DS_Store 10KB
.DS_Store 10KB
.DS_Store 10KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 8KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
fa-solid-900.eot 198KB
fa-solid-900.eot 198KB
fa-brands-400.eot 130KB
fa-brands-400.eot 130KB
themify.eot 77KB
themify.eot 77KB
fa-regular-400.eot 34KB
fa-regular-400.eot 34KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.eot 20KB
loading.gif 8KB
loading.gif 8KB
loader.gif 7KB
loader.gif 7KB
thumbnail.gif 4KB
index.html 7.86MB
index.html 476KB
index-slider.html 101KB
index-slider.html 100KB
pricing-comparision.html 95KB
pricing-comparision.html 95KB
index.html 90KB
index-top-navbar.html 90KB
index-top-navbar.html 88KB
index-gaming.html 88KB
index.html 88KB
index-gaming.html 87KB
shared-hosting.html 85KB
shared-hosting.html 85KB
vps-hosting.html 84KB
vps-hosting.html 84KB
index-video.html 84KB
index-video.html 83KB
index-black-friday.html 82KB
index-black-friday.html 82KB
共 1929 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
办公模板库素材蛙
- 粉丝: 1660
- 资源: 2299
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0