pear/net_dns2
Abandoned; use mikepultz/netdns2. PHP DNS Resolver and Updater Library
v2.0.7
3.2M downloads/mo
#3764 most downloaded on Packagist
mikepultz/netdns2
What this package is like to depend on
Last release 9 months ago
17 Nov 2025
Release timing varies
gaps range from 2 weeks to 2.7 years
Some releases are documented
notes for 8 of 23 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
24 releases · first in 2013
3 releases in the last 12 months
see the full history below
Release timeline
23 releases · May 2013 to Nov 2025Releases
latest 24-
v2.0.717 Nov 2025Release notes
Open source →- changed the hashing algorithm used for cache storage from sha256 -> xxh128; the xxHash algorithms are faster
- bugfix: fixed #177 - the "NULL" resource record has an issue because the name conflicts with the PHP reserved word "null", so I
had originally named it "NUL" instead, but apparently this causes a problem for NTFS in Windows. I've changed it now to be
"RR_NULL", which is dumb looking, but shouldn't conflict with anything. It can still be created in the way using "NULL", just the
class name is named inconsistently. - bugfix: fixed #178 - I was trimming periods from names in the new Data class- which is correct for Domains and Mailboxes, but
not Text objects, as it can break when you have a domain that happens to line up just right. This fix only trims() the period
when it's a Domain or Mailbox class.
Release notes
Open source →- changed the hashing algorithm used for cache storage from sha256 -> xxh128; the xxHash algorithms are faster
- bugfix: fixed #177 - the "NULL" resource record has an issue because the name conflicts with the PHP reserved word "null", so I had originally named it "NUL" instead, but apparently this causes a problem for NTFS in Windows. I've changed it now to be "RR_NULL", which is dumb looking, but shouldn't conflict with anything. It can still be created in the way using "NULL", just the class name is named inconsistently.
- bugfix: fixed #178 - I was trimming periods from names in the new Data class- which is correct for Domains and Mailboxes, but not Text objects, as it can break when you have a domain that happens to line up just right. This fix only trims() the period when it's a Domain or Mailbox class.
-
v2.0.617 Oct 2025Release notes
Open source →- bugfix: fixed #173 - the Client.php was comparing the $rr->type value to "SOA" but should have been using the new ENUM value.
- changed from mt_rand() to random_int(); provides the same value, but faster and produces less complaints from code scanners about
weak RNG, even though it doesn't actually matter since this isn't used for cryptography. - realpath() the resolv.conf and private key file path just-in-case; this isn't a real problem.
- changed the resolver cache to use sha256 instead of md5(); again, this isn't cryptographic, so it doesn't matter, but in my testing
the sha256 function is surprisingly slightly faster than md5(), and it kills the complaints from code scanners. - dropped the use of curl_close(); it's deprecated as of PHP 8.5.
- cleaned up the BitMap::arrayToBitMap() function, and created a phpunit test to confirm it's working.
- changed any isset() cases to use === to avoid "loose comparison" warnings.
Release notes
Open source →- bugfix: fixed #173 - the Client.php was comparing the $rr->type value to "SOA" but should have been using the new ENUM value.
- changed from mt_rand() to random_int(); provides the same value, but faster and produces less complaints from code scanners about weak RNG, even though it doesn't actually matter since this isn't used for cryptography.
- realpath() the resolv.conf and private key file path just-in-case; this isn't a real problem.
- changed the resolver cache to use sha256 instead of md5(); again, this isn't cryptographic, so it doesn't matter, but in my testing the sha256 function is surprisingly slightly faster than md5(), and it kills the complaints from code scanners.
- dropped the use of curl_close(); it's deprecated as of PHP 8.5.
- cleaned up the BitMap::arrayToBitMap() function, and created a phpunit test to confirm it's working.
- changed any isset() cases to use === to avoid "loose comparison" warnings.
-
v2.0.521 Sep 2025Release notes
Open source →- bugfix: fixed #169 - the Client.php was comparing the $qtype value to "AXFR" but should have been using the new ENUM value
- bugfix: fixed #170 - the Socket::read() function could end up in and endless loop when using TCP, and the remote end doesn't
return any data at all. - bugfix: fixed #171 - added a missing __isset() magic method to the RR object.
Release notes
Open source →- bugfix: fixed #169 - the Client.php was comparing the $qtype value to "AXFR" but should have been using the new ENUM value
- bugfix: fixed #170 - the Socket::read() function could end up in and endless loop when using TCP, and the remote end doesn't return any data at all.
- bugfix: fixed #171 - added a missing __isset() magic method to the RR object.
-
v2.0.425 Aug 2025Release notes
Open source →-
fixed the phpdoc for the $_options passed to the Resolver, Notifier, & Updater constructors; the array format was incorrect.
-
fixed the blocking logic in Socket::read(); there were a couple reports of failures here that could only happen in a specific case where only one initial byte of data is returned on TCP connections.
-
fixed #167 - the Mailbox object (used on SOA, RP) RR's didn't support a value without a "." in it (aka an @). While according to RFC1035, this value should be an email address, it seems like DNS servers don't enforce this, so you can add a single value in like "root" and it's accepted.
-
fixed #168 - the SHA1 DNSSEC Digest algorithm was configured as id 0, but should be 1.
Release notes
Open source →- bugfix: fixed the phpdoc for the $_options passed to the Resolver, Notifier, & Updater constructors; the array format was incorrect.
- bugfix: fixed the blocking logic in Socket::read(); there were a couple reports of failures here that could only happen in a specific case where only one initial byte of data is returned on TCP connections.
- bugfix: fixed #167 - the Mailbox object (used on SOA, RP) RR's didn't support a value without a "." in it (aka an @). While according to RFC1035, this value should be an email address, it seems like DNS servers don't enforce this, so you can add a single value in like "root" and it's accepted.
- bugfix: fixed #168 - the SHA1 DNSSEC Digest algorithm was configured as id 0, but should be 1.
-
-
v2.0.313 Jul 2025Release notes
Open source →- fixed #162; the type() was missing when creating a Data\Mailbox type in RR::__set().
- changed the default $_offset value for Data types to -1 instead of null; it achieves the same goal (an "unset state"), but resolves a few PHPstan complaints.
Release notes
Open source →- bugfix: fixed #162; the type() was missing when creating a Data\Mailbox type in RR::__set().
- changed the default $_offset value for Data types to -1 instead of null; it achieves the same goal (an "unset state"), but resolves a few PHPstan complaints.
-
v2.0.208 Jul 2025Release notes
Open source →- Added support for Internationalized Domain Names (IDN)
- Fixed #160 - the Updater() and Notifier() class constructors were accidentially changed to require a response value; this was changed back to default to null.
- Fixed #161 - there was a domain encoding issue related to TSIG signatures, when using key names or algorithms with periods in them. This was part of a larger encoding logic issue.
Release notes
Open source →- Added support for Internationalized Domain Names (IDN)
- bugfix: fixed #160 - the Updater() and Notifier() class constructors were accidentially changed to require a response value; this was changed back to default to null.
- bugfix: fixed #161 - there was a domain encoding issue related to TSIG signatures, when using key names or algorithms with periods in them. This was part of a larger encoding logic issue.
-
v2.0.110 Jun 2025Release notes
Open source →- bugfix: \NetDNS2\RR\PTR::ptrdname was set to private instead of protected #157
- bugfix: the IPv4 & IPv6 data objects were missing from the \NetDNS2\RR::set() function.
- bugfix: the Text data object was being referenced incorrectly with a lead \ in \NetDNS2\RR::set().
Release notes
Open source →- bugfix: \NetDNS2\RR\PTR::ptrdname was set to private instead of protected #157
- bugfix: the IPv4 & IPv6 data objects were missing from the \NetDNS2\RR::set() function.
- bugfix: the Text data object was being referenced incorrectly with a lead \ in \NetDNS2\RR::set().
-
v2.0.009 Jun 2025Release notes
Open source →IMPORTANT: this release is not backwards compatible with v1.x - see the README for more details on upgrading.
- Minimum PHP version was increased to 8.1; this version uses strong typing, ENUMs, and other modern PHP features.
- Complete code re-factor, converting to PSR-4 style autoloading, and namespace semantics.
- Added support for DNS over TLS (DoT).
- Added support for DNS over HTTPS (DoH).
- Added support for (almost) all EDNS(0) features (client subnet, cookies, TCP keepalives, etc.)
- Added Memcache & Redis support in the local cache object.
- Added the HTTPS, SVCB, DSYNC, and other resource records.
Release notes
Open source →IMPORTANT: this release is not backwards compatible with v1.x - see the README for more details on upgrading.
- Minimum PHP version was increased to 8.1; this version uses strong typing, ENUMs, and other modern PHP features.
- Complete code re-factor, converting to PSR-4 style autoloading, and namespace semantics.
- Added support for DNS over TLS (DoT).
- Added support for DNS over HTTPS (DoH).
- Added support for (almost) all EDNS(0) features (client subnet, cookies, TCP keepalives, etc.)
- Added Memcache & Redis support in the local cache object.
- Added the HTTPS, SVCB, DSYNC, and other resource records.
-
v2.0.0-RC103 Jun 2025 pre-releaseRelease notes
Open source →IMPORTANT: this release is not backwards compatible with v1.x - see the README for more details on upgrading.
- Minimum PHP version was increased to 8.1; this version uses strong typing, ENUMs, and other modern PHP features.
- Complete code re-factor, converting to PSR-4 style autoloading, and namespace semantics.
- Added support for DNS over TLS (DoT).
- Added support for DNS over HTTPS (DoH).
- Added support for (almost) all EDNS(0) features (client subnet, cookies, TCP keepalives, etc.)
- Added Memcache & Redis support in the local cache object.
- Added the HTTPS, SVCB, DSYNC, and other resource records.
This is an initial release candidate for testing purposes, and should not be used in production environments.
-
v1.5.517 May 2025Nothing published for this version
-
v1.5.401 Oct 2023Nothing published for this version
-
v1.5.328 Nov 2022Nothing published for this version
-
v1.5.211 Oct 2020Nothing published for this version
-
v1.5.111 Oct 2020Nothing published for this version
-
v1.5.008 Oct 2020Nothing published for this version
-
v1.4.413 Feb 2018Nothing published for this version
-
v1.4.312 Feb 2017Nothing published for this version
-
v1.4.223 Aug 2016Nothing published for this version
-
1.4.113 Apr 2015Nothing published for this version
-
1.4.022 Mar 2015Nothing published for this version
-
1.3.228 Nov 2013Nothing published for this version
-
1.3.113 Jun 2013Nothing published for this version
-
1.3.027 May 2013Nothing published for this version
-
1.2.5no dateNothing published for this version