Net_DNS2 Version 1.2.0
I've released a new version of the PEAR Net_DNS2 library- you can install it now through the command line PEAR installer:
pear install Net_DNS2
Or download it directly from the Google Code page here.
This release includes a significant speed-up with the local cache by using JSON to encode the cache data, rather then the PHP serialize function. Using JSON loses the class information of the objects, but the data remains the same, and the serialization time is about half.
A Query lookup against Google DNS- NO cache
time: 0.0340800285339 Net_DNS2_RR_A Object ( [address] => 199.59.148.82 [name] => twitter.com [type] => A [class] => IN [ttl] => 28 [rdlength] => 4 [rdata] => )
with cache + serialize
time: 0.00258994102478 Net_DNS2_RR_A Object ( [address] => 199.59.148.82 [name] => twitter.com [type] => A [class] => IN [ttl] => 28 [rdlength] => 4 [rdata] => )
with cache + json
time: 0.00178384780884 stdClass Object ( [address] => 199.59.148.82 [name] => twitter.com [type] => A [class] => IN [ttl] => 28 [rdlength] => 4 [rdata] => )
Version 1.2.0
This version changes the way some exceptions are thrown, and may break your code!
- added numeric error codes to the Lookups class, and had each method that throws an exception throw a numeric error code along with the message.
- dropped all references to InvalidArgumentException; we only use the Net_DNS2_Exception from now on.
- added the CAA, URI, TALINK, CDS and TA resource records. Some of these are experimental, but are pretty straight forward.
- fixed a bug in formatString(); my version was only putting double quotes around strings that have spaces, but apparently ALL strings should have double quotes around them. This is how BIND does it.
- re-organized the Net_DNS2_Lookups initialization code; it no longer creates a global object of itself.
- fixed a bug in the caching code; in some cases it wouldn't cache the same content more then once.
- added an option to use JSON to serialize the cache data rather than using the PHP serialize function. JSON is much faster, but loses the class definition, and becomes a stdClass object.
- fixed a handful of cases where I was using double quotes (") where a single quote (') would be fine.
Net_DNS2 Version 1.1.0
Net_DNS2 version 1.1.0 is now available for download from the PEAR site, or can be installed using the "pear" command line client like:
pear install Net_DNS2
This release includes support for signing DNS updates and zone transfers (AXFR's) using SIG(0), a private/public key authentication mechanism. The OpenSSL PHP extension is required for this feature to work.
//
// create a new Updater object
//
$u = new Net_DNS2_Updater('example.com', array('nameservers' => array('192.168.0.1')));
//
// add a SIG(0) to authenticate the request
//
$u->signSIG0('/etc/namedb/Kexample.com.+001+15765.private');
//
// send the update rquest.
//
$u->update();
Support for the ATMA resource record- a method for publishing ATM addresses via DNS.
@ IN SOA name1.data.example.com. name4.data.example.com. (
1994041800 ; Serial - date
1800 ; Refresh - 30 minutes
300 ; Retry - 5 minutes
604800 ; Expire - 7 days
3600 ) ; Minimum - 1 hour
IN NS name1.data.example.com.
IN NS ns.example.com.
;
salmon IN ATMA 39.246f.000e7c9c031200010001.000012345678.00
And a new simple local cache system, using shared memory (using the PHP Shmop Extension), or using a flat file.
$r = new Net_DNS2_Resolver(array(
'cache_type' => 'shared',
'cache_file' => '/tmp/net_dns2.cache',
'cache_size' => 100000
));
Caching is disabled by default, and is only used for DNS queries (and not for updates), but can drastically improve query performance.
For more details, see the Net_DNS2 Google Code Page.
Net_DNS2 Version 1.0.1 Released
The new version of Net_DNS2 is now available from the PEAR website.
This release fixes a small bug in the size calculation for TCP packets, and adds support for the WKS resource record.
Get it here.
Mr.DNS Network Tools v1.9
This Mr.DNS release includes support for the AAAA (IPv6) record, the LOC record (for storing geo-location information in DNS)
and all the DNSSEC resource records (DNSKEY, RRSIG, NSEC, DS, NSEC3 and NSEC3PARAM).
This release is also the first release to us our new Net_DNS2 PEAR module. This module is significantly faster than the Net_DNS module, using new PHP5 constructs, exceptions, and includes many more RR's.
Net_DNS2 is available for download from the Google Code page, and soon from the PEAR site and command line PEAR installer.

