|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
|
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » preg_match() » fopen() » header() » getimagesize() » preg_match_all() » session_start() » htmlspecialchars() » ob_start() » ob_flush() » strstr() » flush() » strpos() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » ereg_replace() » urlencode() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: dns_get_record (PHP 5) dns_get_record -- Fetch DNS Resource Records associated with a hostnameDescriptionarray dns_get_record ( string hostname [, int type [, array &authns, array &addtl]] )
Note: This function is not implemented on Windows platforms, nor does it (currently) work on *BSD systems. Try the PEAR class Net_DNS . This function returns an array of associative arrays. Each associative array contains at minimum the following keys: Table 1. Basic DNS attributes Attribute Meaning host The record in the DNS namespace to which the rest of the associated data refers. class dns_get_record() only returns Internet class records and as such this parameter will always return IN . type String containing the record type. Additional attributes will also be contained in the resulting array dependant on the value of type. See table below. ttl Time To Live remaining for this record. This will not equal the record's original ttl, but will rather equal the original ttl minus whatever length of time has passed since the authoritative name server was queried.hostname should be a valid DNS hostname such as "www.example.com". Reverse lookups can be generated using in-addr.arpa notation, but gethostbyaddr() is more suitable for the majority of reverse lookups. By default, dns_get_record() will search for any resource records associated with hostname . To limit the query, specify the optional type parameter. type may be any one of the following: DNS_A , DNS_CNAME , DNS_HINFO , DNS_MX , DNS_NS , DNS_PTR , DNS_SOA , DNS_TXT , DNS_AAAA , DNS_SRV , DNS_NAPTR , DNS_A6 , DNS_ALL or DNS_ANY . The default is DNS_ANY . Note: Because of eccentricities in the performance of libresolv between platforms, DNS_ANY will not always return every record, the slower DNS_ALL will collect all records more reliably. The optional third and fourth arguments to this function, authns and addtl are passed by reference and, if given, will be populated with Resource Records for the Authoritative Name Servers , and any Additional Records respectively. See the example below.
Table 2. Other keys in associative arrays dependant on 'type' Type Extra Columns A ip : An IPv4 addresses in dotted decimal notation. MX pri : Priority of mail exchanger. Lower numbers indicate greater priority. target : FQDN of the mail exchanger.Related Function(s) |