PHP dns_get_record() လုပ်ဆောင်ချက်
ဥပမာ
"www.w3schools.com" နှင့်ဆက်စပ်နေသည့် MX အရင်းအမြစ်မှတ်တမ်းများကို ရယူပါ-
<?php
print_r(dns_get_record("w3schools.com", DNS_MX));
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
dns_get_record() လုပ်ဆောင်ချက်သည် သတ်မှတ်ထားသော hostname နှင့်ဆက်စပ်နေသော DNS အရင်းအမြစ်မှတ်တမ်းများကို ရရှိသည်။
အထားအသို
dns_get_record(hostname, type, authns, addtl, raw)
ကန့်သတ်တန်ဖိုးများ
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 |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- |
ပေါင်းစည်းထားသော array ၏ array တစ်ခု၊ ပျက်ကွက်မှုတွင် မှားနေသည်။ ခင်းကျင်းတစ်ခုစီတွင် အောက်ပါသော့များ (အနည်းဆုံး အနည်းဆုံး) ပါဝင်သည်-
array များရှိ အခြားသောသော့များသည် အမျိုးအစား ကန့်သတ်ချက်များ အပေါ် မူတည် ပါသည်။ |
---|---|
PHP ဗားရှင်း- | 5.0+ |
PHP Changelog- | PHP 7.0.16- DNS_CAA အမျိုးအစား အတွက် ပံ့ပိုးမှု ထပ်ထည့် ထားသည်။ PHP 5.4- အကြမ်းဘောင်ကို ပေါင်းထည့် ထားသည် ။ PHP 5.3- Windows ပလပ်ဖောင်းများတွင် ရနိုင်သည်။ |
❮ PHP Network ရည်ညွှန်းချက်