reference/network/functions/dns-get-record.xml
7be2426e49ee1c9131866f20b67a48aaea0a642a
...
...
@@ -9,12 +9,12 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>dns_get_record</methodname>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>dns_get_record</methodname>
13
13
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>DNS_ANY</initializer></methodparam>
15
-
<methodparam choice="opt"><type>array</type><parameter role="reference">authns</parameter></methodparam>
16
-
<methodparam choice="opt"><type>array</type><parameter role="reference">addtl</parameter></methodparam>
17
-
<methodparam choice="opt"><type>bool</type><parameter role="reference">raw</parameter><initializer>false</initializer></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer><constant>DNS_ANY</constant></initializer></methodparam>
15
+
<methodparam choice="opt"><type>array</type><parameter role="reference">authoritative_name_servers</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type>array</type><parameter role="reference">additional_records</parameter><initializer>&null;</initializer></methodparam>
17
+
<methodparam choice="opt"><type>bool</type><parameter>raw</parameter><initializer>&false;</initializer></methodparam>
18
18
</methodsynopsis>
19
19
<para>
20
20
Fetch DNS Resource Records associated with the given
...
...
@@ -55,12 +55,13 @@
55
55
To limit the query, specify the optional <parameter>type</parameter>
56
56
parameter. May be any one of the following:
57
57
<constant>DNS_A</constant>, <constant>DNS_CNAME</constant>,
58
-
<constant>DNS_HINFO</constant>, <constant>DNS_MX</constant>,
59
-
<constant>DNS_NS</constant>, <constant>DNS_PTR</constant>,
60
-
<constant>DNS_SOA</constant>, <constant>DNS_TXT</constant>,
61
-
<constant>DNS_AAAA</constant>, <constant>DNS_SRV</constant>,
62
-
<constant>DNS_NAPTR</constant>, <constant>DNS_A6</constant>,
63
-
<constant>DNS_ALL</constant> or <constant>DNS_ANY</constant>.
58
+
<constant>DNS_HINFO</constant>, <constant>DNS_CAA</constant>,
59
+
<constant>DNS_MX</constant>, <constant>DNS_NS</constant>,
60
+
<constant>DNS_PTR</constant>, <constant>DNS_SOA</constant>,
61
+
<constant>DNS_TXT</constant>, <constant>DNS_AAAA</constant>,
62
+
<constant>DNS_SRV</constant>, <constant>DNS_NAPTR</constant>,
63
+
<constant>DNS_A6</constant>, <constant>DNS_ALL</constant>
64
+
or <constant>DNS_ANY</constant>.
64
65
</para>
65
66
<note>
66
67
<para>
...
...
@@ -70,10 +71,16 @@
70
71
will collect all records more reliably.
71
72
</para>
72
73
</note>
74
+
<note>
75
+
<para>
76
+
Windows: <constant>DNS_CAA</constant> is not supported.
77
+
Support for <constant>DNS_A6</constant> is not implemented.
78
+
</para>
79
+
</note>
73
80
</listitem>
74
81
</varlistentry>
75
82
<varlistentry>
76
-
<term><parameter>authns</parameter></term>
83
+
<term><parameter>authoritative_name_servers</parameter></term>
77
84
<listitem>
78
85
<para>
79
86
Passed by reference and, if given, will be populated with Resource
...
...
@@ -82,7 +89,7 @@
82
89
</listitem>
83
90
</varlistentry>
84
91
<varlistentry>
85
-
<term><parameter>addtl</parameter></term>
92
+
<term><parameter>additional_records</parameter></term>
86
93
<listitem>
87
94
<para>
88
95
Passed by reference and, if given, will be populated with any
...
...
@@ -94,8 +101,10 @@
94
101
<term><parameter>raw</parameter></term>
95
102
<listitem>
96
103
<para>
97
-
In case of raw mode, we query only the requestd type instead of looping
98
-
type by type before going with the additional info stuff.
104
+
The <parameter>type</parameter> will be interpreted as a raw DNS type ID
105
+
(the <literal>DNS_*</literal> constants cannot be used).
106
+
The return value will contain a <literal>data</literal> key, which needs
107
+
to be manually parsed.
99
108
</para>
100
109
</listitem>
101
110
</varlistentry>
...
...
@@ -216,11 +225,21 @@
216
225
</entry>
217
226
</row>
218
227
<row>
228
+
<entry><literal>CAA</literal></entry>
229
+
<entry>
230
+
<literal>flags</literal>: A one-byte bitfield; currently only bit 0 is defined,
231
+
meaning 'critical'; other bits are reserved and should be ignored.
232
+
<literal>tag</literal>: The CAA tag name (alphanumeric ASCII string).
233
+
<literal>value</literal>: The CAA tag value (binary string, may use subformats).
234
+
For additional information see: <link xlink:href="&url.rfc;6844">RFC 6844</link>
235
+
</entry>
236
+
</row>
237
+
<row>
219
238
<entry><literal>SOA</literal></entry>
220
239
<entry>
221
240
<literal>mname</literal>: FQDN of the machine from which the resource
222
241
records originated.
223
-
<literal>rname</literal>: Email address of the administrative contain
242
+
<literal>rname</literal>: Email address of the administrative contact
224
243
for this domain.
225
244
<literal>serial</literal>: Serial # of this revision of the requested
226
245
domain.
...
...
@@ -244,7 +263,7 @@
244
263
</entry>
245
264
</row>
246
265
<row>
247
-
<entry><literal>A6</literal>(PHP &gt;= 5.1.0)</entry>
266
+
<entry><literal>A6</literal></entry>
248
267
<entry>
249
268
<literal>masklen</literal>: Length (in bits) to inherit from the target
250
269
specified by <parameter>chain</parameter>.
...
...
@@ -294,23 +313,9 @@
294
313
</thead>
295
314
<tbody>
296
315
<row>
297
-
<entry>5.4.0</entry>
316
+
<entry>7.0.16, 7.1.2</entry>
298
317
<entry>
299
-
Added <parameter>raw</parameter> parameter.
300
-
</entry>
301
-
</row>
302
-
<row>
303
-
<entry>5.3.0</entry>
304
-
<entry>
305
-
This function is now available on Windows platforms.
306
-
</entry>
307
-
</row>
308
-
<row>
309
-
<entry>5.3.0</entry>
310
-
<entry>
311
-
Prior to this release, if the <parameter>authns</parameter> parameter
312
-
was given, the <parameter>addtl</parameter> parameter was also
313
-
required.
318
+
Added support for CAA record type.
314
319
</entry>
315
320
</row>
316
321
</tbody>
...
...
@@ -365,8 +370,8 @@ Array
365
370
<para>
366
371
Since it's very common to want the IP address of a mail server
367
372
once the MX record has been resolved, <function>dns_get_record</function>
368
-
also returns an array in <parameter>addtl</parameter> which
369
-
contains associate records. <parameter>authns</parameter>
373
+
also returns an array in <parameter>additional_records</parameter> which
374
+
contains associate records. <parameter>authoritative_name_servers</parameter>
370
375
is returned as well containing a list of authoritative name
371
376
servers.
372
377
</para>
...
...
@@ -506,17 +511,6 @@ Additional = Array
506
511
</para>
507
512
</refsect1>
508
513

509
-
<refsect1 role="notes">
510
-
&reftitle.notes;
511
-
<note>
512
-
<para>
513
-
For compatibility with versions before PHP 5.3.0 on some operating systems,
514
-
try the <link xlink:href="&url.php.pear;">PEAR</link> class
515
-
<link xlink:href="&url.pear.package;Net_DNS">Net_DNS</link>.
516
-
</para>
517
-
</note>
518
-
</refsect1>
519
-

520
514
<refsect1 role="seealso">
521
515
&reftitle.seealso;
522
516
<para>
...
...
@@ -528,7 +522,6 @@ Additional = Array
528
522
</refsect1>
529
523

530
524
</refentry>
531
-

532
525
<!-- Keep this comment at the end of the file
533
526
Local variables:
534
527
mode: sgml
535
528