PHP dns_get_mx()ฟังก์ชั่น
ตัวอย่าง
ส่งรายละเอียดของบันทึกการแลกเปลี่ยนจดหมาย (ระเบียน MX):
<?php
$domain="w3schools.com";
if(dns_get_mx($domain,$mx_details)){
foreach($mx_details as $key=>$value){
echo "$key =>
$value <br>";
}
}
?>
ความหมายและการใช้งาน
ฟังก์ชัน dns_get_mx() เป็นนามแฝงของฟังก์ชันgetmxrr()
ไวยากรณ์
dns_get_mx(host, mxhosts, weight)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
host | Required. Specifies the host name |
mxhosts | Required. An array that specifies a list of MX records found |
weight | Optional. An array that specifies the weight information gathered |
รายละเอียดทางเทคนิค
คืนมูลค่า: | TRUE หากพบบันทึกใด ๆ FALSE เป็นอย่างอื่น |
---|---|
รุ่น PHP: | 5.0+ |
❮ การอ้างอิงเครือข่าย PHP