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. [HTTP &amp; Networking](/categories/http)
4. /
5. arrayaccess/dns-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

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

Php DNS Client Resolver

1.0.2(2y ago)124LGPL-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 yesterday

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 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

963d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37867551?v=4)[ArrayIterator](/maintainers/ArrayIterator)[@ArrayIterator](https://github.com/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

537133.1M104](/packages/react-dns)[mikepultz/netdns2

PHP DNS Resolver and Updater Library

136155.7k12](/packages/mikepultz-netdns2)

PHPackages © 2026

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