PHP dns_get_record() Funksie
Voorbeeld
Kry die MX-hulpbronrekords wat met "www.w3schools.com" geassosieer word:
<?php
print_r(dns_get_record("w3schools.com", DNS_MX));
?>
Definisie en gebruik
Die dns_get_record()-funksie kry die DNS-hulpbronrekords wat met die gespesifiseerde gasheernaam geassosieer word.
Sintaksis
dns_get_record(hostname, type, authns, addtl, raw)
Parameterwaardes
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com") |
type | Optional. Specifies the resource record type to search for. Can be one of the following:
|
authns | Optional. Passed by reference and, if set, it will be populated with Resource Records for the Authoritative Name Servers |
addtl | Optional. Passed by reference and, if set, it will be populated with any Additional Records |
raw | Optional. A Boolean value. If set to TRUE, it queries only the requested type instead of looping type-by-type before getting the info stuff. Default is FALSE |
Tegniese besonderhede
Terugkeerwaarde: |
'n Verskeidenheid assosiatiewe skikkings, ONWAAR op mislukking. Elke skikking bevat die volgende sleutels (minstens):
Ander sleutels in die skikkings hang af van die tipe parameter. |
---|---|
PHP weergawe: | 5,0+ |
PHP Changelog: | PHP 7.0.16: Bygevoeg ondersteuning vir DNS_CAA tipe . PHP 5.4: Het die rou parameter bygevoeg. PHP 5.3: Beskikbaar op Windows-platforms. |
❮ PHP-netwerkverwysing