Php/func network getmxrr
来自菜鸟教程
PHP getmxrr()函数
例
返回邮件交换器记录(MX记录)的详细信息:
<?php
$domain="example.com";
if(getmxrr($domain,$mx_details)){
foreach($mx_details as $key=>$value){
echo "$key =>
$value <br>";
}
}
?>
定义和用法
getmxrr()函数返回指定Internet主机名的MX记录。
句法
getmxrr(host, mxhosts, weight)
参数值
| 参数 | 描述 |
|---|---|
| host | 需要。指定主机名 |
| mxhosts | 需要。一个数组,指定找到的MX记录的列表 |
| weight | 可选的。指定收集的重量信息的数组 |
技术细节
| 返回值: | 如果找到任何记录,则为TRUE,否则为FALSE |
| PHP版本: | 4.0+ |
| PHP更新日志: | PHP 5.3:现在在Windows平台上可用 |