note 89099 added to function.dns-get-record
| From: | dylan at tracker dot thepiratebay dot org | Date: | Sat, 21 Feb 2009 19:29:35 +0000 |
| Subject: | note 89099 added to function.dns-get-record | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150927@lists.php.net to get a copy of this message | ||
Get more than one type at once like this:
<?php
$dnsr = dns_get_record('php.net', DNS_A + DNS_NS);
print_r($dnsr);
?>
Using DNS_ALL fails on some domains where DNS_ANY works. I noticed the function getting stuck on the
DNS_PTR record, which caused it to return FALSE with this error:
PHP Warning: dns_get_record(): res_nsend() failed in ....
This gets all records except DNS_PTR:
<?php
$dnsr = dns_get_record('php.net', DNS_ALL - DNS_PTR);
print_r($dnsr);
?>
----
Server IP: 216.235.13.26
Probable Submitter: 70.54.10.210
----
Manual Page -- http://www.php.net/manual/en/function.dns-get-record.php
Edit -- https://master.php.net/note/edit/89099
Del: integrated -- https://master.php.net/note/delete/89099/integrated
Del: useless -- https://master.php.net/note/delete/89099/useless
Del: bad code -- https://master.php.net/note/delete/89099/bad+code
Del: spam -- https://master.php.net/note/delete/89099/spam
Del: non-english -- https://master.php.net/note/delete/89099/non-english
Del: in docs -- https://master.php.net/note/delete/89099/in+docs
Del: other reasons-- https://master.php.net/note/delete/89099
Reject -- https://master.php.net/note/reject/89099
Search -- https://master.php.net/manage/user-notes.php