reference/network/functions/dns-get-record.xml
35ca7f1087870c6023ef7a3dd0248501741c8194
...
...
@@ -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
...
...
@@ -52,28 +52,14 @@
52
52
<para>
53
53
By default, <function>dns_get_record</function> will search for any
54
54
resource records associated with <parameter>hostname</parameter>.
55
-
To limit the query, specify the optional <parameter>type</parameter>
56
-
parameter. May be any one of the following:
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>.
55
+
To limit the query, use one of the
56
+
<constant>DNS_<replaceable>*</replaceable></constant>
57
+
constants.
64
58
</para>
65
-
<note>
66
-
<para>
67
-
Because of eccentricities in the performance of libresolv
68
-
between platforms, <constant>DNS_ANY</constant> will not
69
-
always return every record, the slower <constant>DNS_ALL</constant>
70
-
will collect all records more reliably.
71
-
</para>
72
-
</note>
73
59
</listitem>
74
60
</varlistentry>
75
61
<varlistentry>
76
-
<term><parameter>authns</parameter></term>
62
+
<term><parameter>authoritative_name_servers</parameter></term>
77
63
<listitem>
78
64
<para>
79
65
Passed by reference and, if given, will be populated with Resource
...
...
@@ -82,7 +68,7 @@
82
68
</listitem>
83
69
</varlistentry>
84
70
<varlistentry>
85
-
<term><parameter>addtl</parameter></term>
71
+
<term><parameter>additional_records</parameter></term>
86
72
<listitem>
87
73
<para>
88
74
Passed by reference and, if given, will be populated with any
...
...
@@ -94,8 +80,10 @@
94
80
<term><parameter>raw</parameter></term>
95
81
<listitem>
96
82
<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.
83
+
The <parameter>type</parameter> will be interpreted as a raw DNS type ID
84
+
(the <constant>DNS_<replaceable>*</replaceable></constant> constants cannot be used).
85
+
The return value will contain a <literal>data</literal> key, which needs
86
+
to be manually parsed.
99
87
</para>
100
88
</listitem>
101
89
</varlistentry>
...
...
@@ -153,7 +141,7 @@
153
141
</para>
154
142
<para>
155
143
<table>
156
-
<title>Other keys in associative arrays dependant on 'type'</title>
144
+
<title>Other keys in associative arrays dependent on <parameter>type</parameter></title>
157
145
<tgroup cols="2">
158
146
<thead>
159
147
<row>
...
...
@@ -215,12 +203,22 @@
215
203
Names</literal></link> for the meaning of these values.
216
204
</entry>
217
205
</row>
206
+
<row>
207
+
<entry><literal>CAA</literal></entry>
208
+
<entry>
209
+
<literal>flags</literal>: A one-byte bitfield; currently only bit 0 is defined,
210
+
meaning 'critical'; other bits are reserved and should be ignored.
211
+
<literal>tag</literal>: The CAA tag name (alphanumeric ASCII string).
212
+
<literal>value</literal>: The CAA tag value (binary string, may use subformats).
213
+
For additional information see: <link xlink:href="&url.rfc;6844">RFC 6844</link>
214
+
</entry>
215
+
</row>
218
216
<row>
219
217
<entry><literal>SOA</literal></entry>
220
218
<entry>
221
219
<literal>mname</literal>: FQDN of the machine from which the resource
222
220
records originated.
223
-
<literal>rname</literal>: Email address of the administrative contain
221
+
<literal>rname</literal>: Email address of the administrative contact
224
222
for this domain.
225
223
<literal>serial</literal>: Serial # of this revision of the requested
226
224
domain.
...
...
@@ -244,7 +242,7 @@
244
242
</entry>
245
243
</row>
246
244
<row>
247
-
<entry><literal>A6</literal>(PHP &gt;= 5.1.0)</entry>
245
+
<entry><literal>A6</literal></entry>
248
246
<entry>
249
247
<literal>masklen</literal>: Length (in bits) to inherit from the target
250
248
specified by <parameter>chain</parameter>.
...
...
@@ -294,23 +292,9 @@
294
292
</thead>
295
293
<tbody>
296
294
<row>
297
-
<entry>5.4.0</entry>
295
+
<entry>7.0.16, 7.1.2</entry>
298
296
<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.
297
+
Added support for CAA record type.
314
298
</entry>
315
299
</row>
316
300
</tbody>
...
...
@@ -365,8 +349,8 @@ Array
365
349
<para>
366
350
Since it's very common to want the IP address of a mail server
367
351
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>
352
+
also returns an array in <parameter>additional_records</parameter> which
353
+
contains associate records. <parameter>authoritative_name_servers</parameter>
370
354
is returned as well containing a list of authoritative name
371
355
servers.
372
356
</para>
...
...
@@ -506,17 +490,6 @@ Additional = Array
506
490
</para>
507
491
</refsect1>
508
492

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
493
<refsect1 role="seealso">
521
494
&reftitle.seealso;
522
495
<para>
...
...
@@ -528,7 +501,6 @@ Additional = Array
528
501
</refsect1>
529
502

530
503
</refentry>
531
-

532
504
<!-- Keep this comment at the end of the file
533
505
Local variables:
534
506
mode: sgml
535
507