alyakin/dns-checker
最新稳定版本:v2.1.2
Composer 安装命令:
composer require alyakin/dns-checker
包简介
Laravel-friendly DNS lookup wrapper built on NetDNS2 v2
README 文档
README
A Laravel-friendly DNS lookup wrapper built on NetDNS2 v2 for custom resolvers, system fallback, typed exceptions, caching, and Laravel integration.
Quick Start
composer require alyakin/dns-checker
Laravel
php artisan vendor:publish --tag=dns-checker-config
use Alyakin\DnsChecker\Facades\DnsChecker; $records = DnsChecker::getRecords('example.com', 'A');
Plain PHP
use Alyakin\DnsChecker\DnsLookupService; $dns = new DnsLookupService([ 'servers' => ['8.8.8.8', '1.1.1.1'], 'timeout' => 2, 'fallback_to_system' => true, ]); $records = $dns->getRecords('example.com', 'MX');
Compatibility
| Component | Supported / used |
|---|---|
| Package runtime | PHP 8.1–8.3 |
| CI matrix | PHP 8.1, 8.3 |
| DNS library | mikepultz/netdns2:^2.0 |
| Laravel support | illuminate/support:^9.0 || ^10.0 || ^11.0 |
Features
- custom DNS servers with optional fallback to the system resolver
- optional typed exceptions for DNS failures
- optional NXDOMAIN logging control
- optional Laravel Cache-backed caching
- facade, fluent API, DI contract and artisan command support
Documentation
Development
See docs/development.md.
Changelog
See CHANGELOG.md for release history and migration notes.
License
MIT
统计信息
- 总下载量: 141
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-03