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 네트워크 참조