laravel-whois maintained by larva
Last update
2026/11/07 03:30
License
Require
- ext-json *
- io-developer/php-whois ^4.1
- larva/support ^2.0
- php ^8.2
- illuminate/console ^11.0|^12.0|^13.0
- illuminate/http ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- illuminate/database ^11.0|^12.0|^13.0
- illuminate/queue ^11.0|^12.0|^13.0
- jeremykendall/php-domain-parser ^6.4
Last update
2026/11/07 03:30
License
Require
- php ^8.2
- ext-json *
- illuminate/console ^11.0|^12.0|^13.0
- illuminate/http ^11.0|^12.0|^13.0
- illuminate/support ^11.0|^12.0|^13.0
- illuminate/database ^11.0|^12.0|^13.0
- illuminate/queue ^11.0|^12.0|^13.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.4
Last update
2025/07/28 09:21
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0|^12.0
- illuminate/http ^9.0|^10.0|^11.0|^12.0
- illuminate/support ^9.0|^10.0|^11.0|^12.0
- illuminate/database ^9.0|^10.0|^11.0|^12.0
- illuminate/queue ^9.0|^10.0|^11.0|^12.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/10/08 11:30
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0
- illuminate/http ^9.0|^10.0|^11.0
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/database ^9.0|^10.0|^11.0
- illuminate/queue ^9.0|^10.0|^11.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/09/23 08:13
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0
- illuminate/http ^9.0|^10.0|^11.0
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/database ^9.0|^10.0|^11.0
- illuminate/queue ^9.0|^10.0|^11.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/09/23 02:40
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0
- illuminate/http ^9.0|^10.0|^11.0
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/database ^9.0|^10.0|^11.0
- illuminate/queue ^9.0|^10.0|^11.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/09/19 05:19
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0
- illuminate/http ^9.0|^10.0|^11.0
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/database ^9.0|^10.0|^11.0
- illuminate/queue ^9.0|^10.0|^11.0
- larva/support ^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/09/13 10:31
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0|^11.0
- illuminate/http ^9.0|^10.0|^11.0
- illuminate/support ^9.0|^10.0|^11.0
- illuminate/database ^9.0|^10.0|^11.0
- illuminate/queue ^9.0|^10.0|^11.0
- larva/support ^1.3|^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/01/01 16:20
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0
- illuminate/http ^9.0|^10.0
- illuminate/support ^9.0|^10.0
- illuminate/database ^9.0|^10.0
- illuminate/queue ^9.0|^10.0
- larva/support ^1.3|^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/01/01 16:13
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0
- illuminate/http ^9.0|^10.0
- illuminate/support ^9.0|^10.0
- illuminate/database ^9.0|^10.0
- illuminate/queue ^9.0|^10.0
- larva/support ^1.3|^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.0
Last update
2024/01/01 16:09
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0
- illuminate/http ^9.0|^10.0
- illuminate/support ^9.0|^10.0
- illuminate/database ^9.0|^10.0
- illuminate/queue ^9.0|^10.0
- larva/support ^1.3|^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.1
Last update
2024/01/01 15:52
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0
- illuminate/http ^9.0|^10.0
- illuminate/support ^9.0|^10.0
- illuminate/database ^9.0|^10.0
- illuminate/queue ^9.0|^10.0
- larva/support ^1.3|^2.0
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.1
Last update
2023/09/24 03:43
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0|^10.0
- illuminate/http ^9.0|^10.0
- illuminate/support ^9.0|^10.0
- illuminate/database ^9.0|^10.0
- illuminate/queue ^9.0|^10.0
- larva/support ^1.3
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.1
Last update
2022/06/03 17:51
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0
- illuminate/http ^9.0
- illuminate/support ^9.0
- illuminate/database ^9.0
- illuminate/queue ^9.0
- larva/support ^1.3
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.1
Last update
2022/04/10 08:40
License
Require
- php ^8.0.2
- ext-json *
- illuminate/console ^9.0
- illuminate/http ^9.0
- illuminate/support ^9.0
- illuminate/database ^9.0
- illuminate/queue ^9.0
- larva/support ^1.3
- io-developer/php-whois ^4.1
- jeremykendall/php-domain-parser ^6.1
Last update
2021/04/20 05:52
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^6.0
Last update
2021/04/19 20:59
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^6.0
Last update
2021/04/19 14:51
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 14:45
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 13:22
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 10:56
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 10:53
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 10:35
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 05:48
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 05:37
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 05:35
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 04:46
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
- jeremykendall/php-domain-parser ^5.7
Last update
2021/04/19 04:07
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
Last update
2021/04/19 03:53
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.1
- io-developer/php-whois ^4.0
Last update
2021/03/24 11:40
License
Require
- php ^7.2 || ^8.0
- ext-json *
- illuminate/console ^6.0 || ^7.0 || ^8.0
- illuminate/http ^6.0 || ^7.0 || ^8.0
- illuminate/support ^6.0 || ^7.0 || ^8.0
- illuminate/database ^6.0 || ^7.0 || ^8.0
- illuminate/queue ^6.0 || ^7.0 || ^8.0
- larva/support ^1.0
- larva/site-tool ^1.0
- io-developer/php-whois ^4.0
laravel-whois
基于 io-developer/php-whois 的 Laravel WHOIS 查询扩展,支持域名解析、结构化查询和原始响应获取。
环境需求
- PHP 8.2 或更高版本
- Laravel 11、12 或 13
- PHP JSON 扩展
安装
composer require larva/laravel-whois
扩展支持 Laravel 包自动发现,无需手动注册服务提供者或 Facade。
使用
在需要查询的类中引入 Facade:
use Larva\Whois\Whois;
结构化查询
$info = Whois::lookup('www.example.com');
查询成功时返回数组;无法获取结构化信息时返回 null。数组包含以下字段:
| 字段 | 说明 |
|---|---|
parser_type |
响应解析器类型 |
name |
域名 |
registrar |
注册商 |
owner |
所有者信息 |
whois_server |
WHOIS 服务器 |
states |
域名状态数组 |
name_servers |
DNS 服务器数组 |
dnssec |
DNSSEC 信息 |
creation_date |
注册时间,Illuminate\Support\Carbon 实例 |
expiration_date |
过期时间,Illuminate\Support\Carbon 实例 |
updated_date |
更新时间,Illuminate\Support\Carbon 实例 |
response_raw |
原始 WHOIS 响应 |
获取完整查询对象
use Iodev\Whois\Modules\Tld\TldInfo;
/** @var TldInfo|null $info */
$info = Whois::lookupInfo('example.com');
该方法返回 TldInfo 对象或 null,可访问解析库提供的完整字段和原始响应。
获取原始响应
$raw = Whois::lookupRaw('example.com');
解析域名
查询方法支持传入主域名、子域名或包含 URL 的字符串,并会自动提取可注册域名:
$domain = Whois::getDomain('https://www.example.com/path');
// example.com
$domain = Whois::getDomain('www.example.co.uk');
// example.co.uk
异常处理
- 域名无效时可能抛出
Larva\Whois\IllegalDomainException或Pdp\CannotProcessHost。 - WHOIS 服务器连接、响应或解析失败时,可能抛出
Iodev\Whois\Exceptions\WhoisException及其子类。
查询结果取决于对应 WHOIS 服务器返回的数据,执行在线查询时请确保网络可以访问相关 WHOIS 服务。
测试
composer test
部分测试会访问真实 WHOIS 服务器,需要可用的网络连接。