alyakin/dns-checker

Laravel-friendly DNS lookup wrapper built on NetDNS2 v2

Maintainers

Package info

github.com/2177866/dns-checker

pkg:composer/alyakin/dns-checker

Statistics

Installs: 128

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.1.2 2026-03-15 23:12 UTC

This package is auto-updated.

Last update: 2026-03-15 23:12:41 UTC


README

Latest Version on Packagist Total Downloads PHP Version Pint Tests Coverage License

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.18.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