دالة PHP dns_get_record ()
مثال
الحصول على سجلات موارد MX المرتبطة بـ "www.w3schools.com":
<?php
print_r(dns_get_record("w3schools.com", DNS_MX));
?>
التعريف والاستخدام
تحصل وظيفة dns_get_record () على سجلات موارد 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 |
تفاصيل تقنية
قيمة الإرجاع: |
مصفوفة من المصفوفات الترابطية FALSE عند الفشل. تحتوي كل مجموعة على المفاتيح التالية (كحد أدنى):
تعتمد المفاتيح الأخرى في المصفوفات على معلمة النوع . |
---|---|
إصدار PHP: | 5.0+ |
سجل التغيير في PHP: | PHP 7.0.16: تمت إضافة دعم لنوع DNS_CAA . PHP 5.4: تمت إضافة المعلمة الأولية . PHP 5.3: متوفر على أنظمة تشغيل Windows. |
❮ مرجع شبكة PHP