PHPackages                             arrayaccess/dns-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. arrayaccess/dns-client

ActiveLibrary

arrayaccess/dns-client
======================

Php DNS Client Resolver

1.0.2(2y ago)216LGPL-3.0-or-laterPHPPHP &gt;=8.1

Since Nov 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ArrayAccess/DNS-Client)[ Packagist](https://packagist.org/packages/arrayaccess/dns-client)[ GitHub Sponsors](https://github.com/arrayiterator)[ RSS](/packages/arrayaccess-dns-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

PHP DNS Client - DNS Resolver
=============================

[](#php-dns-client---dns-resolver)

Native Php DNS Client / Resolver implementation of [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035). Support [PSR-6: Caching Interface](https://www.php-fig.org/psr/psr-6/).

Requirements
------------

[](#requirements)

- `Php 8.1` or later
- Function `focksopen` enabled &amp; allowed outbound connection to port `53`
- Network Connectivity (*Absolutely!*)

Installing
----------

[](#installing)

Currently, in development:

```
composer require arrayaccess/dns-client
```

Usage
-----

[](#usage)

```
use ArrayAccess\DnsRecord\Cache\Adapter\Psr6CacheAdapter;
use ArrayAccess\DnsRecord\DnsServerStorage;
use ArrayAccess\DnsRecord\Resolver;

$cache = new Psr6CacheAdapter();
// $cache->setCacheItemPool($cacheProvider);
$dnsServer = DnsServerStorage::createDefault();
$resolver = new Resolver($dnsServer, $cache);

/**
 * Lookup Single
 */
$useCache = true; // default to true
$timeout = 3.5; // 3.5 seconds
$response = $resolver->lookup('domain-name.ext', 'A', 'IN', $timeout, $useCache);

/**
 * Enable Pseudo OPT
 */
$resolver->setDnsSec(true);
$response = $resolver->lookup('domain-name.ext', 'A', 'IN');
$answers = $response->getAnswers();
$records = $answers->getRecords();
// Filter "A" Address Only
$arrayA = $records->getFilteredType('A');
```

> IXFR &amp; AXFR aren't fully implemented yet

Note
----

[](#note)

The [RRTypes](src/ResourceRecord/RRTypes) not completed yet, will use [RRDefault](src/ResourceRecord/RRTypes/RRDefault.php) as default.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

917d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb0f33448498e932b0d1b70d2290614c2b62bbcbd545fe236f5866a4b636ca26?d=identicon)[ArrayIterator](/maintainers/ArrayIterator)

---

Top Contributors

[![ArrayIterator](https://avatars.githubusercontent.com/u/37867551?v=4)](https://github.com/ArrayIterator "ArrayIterator (65 commits)")

---

Tags

dnsdns-clientdns-resolverdnslookupphp-dnsrfc1035dnsdns-resolvernameserverphp dnsdns-clientRFC1035

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/arrayaccess-dns-client/health.svg)

```
[![Health](https://phpackages.com/badges/arrayaccess-dns-client/health.svg)](https://phpackages.com/packages/arrayaccess-dns-client)
```

###  Alternatives

[react/dns

Async DNS resolver for ReactPHP

535114.1M100](/packages/react-dns)[amphp/dns

Async DNS resolution for Amp.

19239.2M41](/packages/amphp-dns)[daverandom/libdns

DNS protocol implementation written in pure PHP

16239.1M9](/packages/daverandom-libdns)[spatie/dns

Retrieve DNS records

6082.3M17](/packages/spatie-dns)[mlocati/spf-lib

Parse, build and validate SPF (Sender Policy Framework) DNS records

67867.9k2](/packages/mlocati-spf-lib)[yiisoft/network-utilities

Network related utilities

29503.3k4](/packages/yiisoft-network-utilities)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
