PHP dns_get_record() İşlevi
Örnek
"www.w3schools.com" ile ilişkili MX kaynak kayıtlarını alır:
<?php
print_r(dns_get_record("w3schools.com", DNS_MX));
?>
Tanım ve Kullanım
dns_get_record() işlevi, belirtilen ana bilgisayar adıyla ilişkili DNS kaynak kayıtlarını alır.
Sözdizimi
dns_get_record(hostname, type, authns, addtl, raw)
Parametre Değerleri
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 |
Teknik detaylar
Geri dönüş değeri: |
Bir ilişkisel dizi dizisi, hata durumunda FALSE. Her dizi aşağıdaki anahtarları içerir (en az):
Dizilerdeki diğer anahtarlar type parametresine bağlıdır . |
---|---|
PHP Sürümü: | 5.0+ |
PHP Değişiklik Günlüğü: | PHP 7.0.16: DNS_CAA türü için destek eklendi . PHP 5.4: Ham parametre eklendi. PHP 5.3: Windows platformlarında mevcuttur. |
❮ PHP Ağ Referansı