JEP 39 - DNS Support
- Champion & Author: Rene Bartsch <rene at bartschnet dot de >
- Status: Draft
- Type: API Track
- Created: 10 Feb 2010
- Reference Implementation: None (PHP-function 'dns_get_record()')
- JEP Index
Introduction and Rationale
This JEP proposes DNS access for the Jetpack API.
A lot of information are available in the Domain Name System. This does not only limit to IP-Addresses of hosts but also provides contact records (NAPTR-RR), hardware-information (TXT-RRs), geographical data and so on. Especially by ENUM and TEL-domains the Domain Name System has become a global addressbook. But currently querying DNS is only possible with plattform-dependend external utilities/APIs (like C/C++/JAVA-code) or webservices as JAVA-/ECMA-script does not support sockets.
DNS access will live at
jetpack.dns.getRecord( zone )
- zone: The DNS zone to query.
Getting the DNS zone information
var content = jetpack.dns.getRecord( zone );
- returns: The UTF-8 formatted zone data from DNS as a two-dimensional array. The first dimension is an numeric array listing the DNS records while the second dimension is an associative array listing the parameters of each DNS record (name, type, ttl, priority, etc.).
var content = jetpack.dns.getRecord('184.108.40.206.220.127.116.11.0.6.1.e164.org');