getmxrr
获取互联网主机名对应的 MX 记录
getmxrr()
函数返回指定互联网主机名的 MX 记录。
返回邮件交换器记录 (MX 记录) 的详细信息:
<?php $domain="gitbox.net"; if(getmxrr($domain,$mx_details)){ foreach($mx_details as $key=>$value){ echo "$key => $value <br>"; } } ?>
getmxrr(host, mxhosts, weight)
参数 | 描述 |
---|---|
host | 必需。指定主机名。 |
mxhosts | 必需。数组,用于指定找到的 MX 记录列表。 |
weight | 可选。数组,用于指定收集到的权重信息。 |