uTools-Manuals/docs/php/getmxrr.html
2019-04-28 19:00:34 +08:00

148 lines
5.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>获取互联网主机名对应的 MX 记录</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.getmxrr" class="refentry">
<div class="refnamediv">
<h1 class="refname">getmxrr</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">getmxrr</span> &mdash; <span class="dc-title">获取互联网主机名对应的 MX 记录</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.getmxrr-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>getmxrr</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$hostname</code></span>
, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$mxhosts</code></span>
[, <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$weight</code></span>
] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
搜索 <code class="parameter">hostname</code>对应的 MX DNS 记录。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.getmxrr-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">hostname</code></dt>
<dd>
<p class="para">
互联网主机名。
</p>
</dd>
<dt>
<code class="parameter">mxhosts</code></dt>
<dd>
<p class="para">
找到的 MX 记录列表存放于 <code class="parameter">mxhosts</code> 数组。
</p>
</dd>
<dt>
<code class="parameter">weight</code></dt>
<dd>
<p class="para">
提供了 <code class="parameter">weight</code> 数组后,它会用找到的权重信息填充数组。
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.getmxrr-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
找到记录返回 <strong><code>TRUE</code></strong>,没找到或者出错时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.getmxrr-changelog">
<h3 class="title">更新日志</h3>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>版本</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>5.3.0</td>
<td>
Windows 平台上也能用这个函数了。
</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 notes" id="refsect1-function.getmxrr-notes">
<h3 class="title">注释</h3>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
本函数不应使用于地址验证。
仅在 MX 记录在 DNS 中找到时才会返回,然而根据 <a href="http://www.faqs.org/rfcs/rfc2821" class="link external">&raquo;&nbsp;RFC 2821</a>
没有 MX 记录时, <code class="parameter">hostname</code> 本身就是 MX 主机,优先级为 <em>0</em>
</p>
</p></blockquote>
<blockquote class="note"><p><strong class="note">Note</strong>:
<p class="para">
在兼容 Windows 实现之前的版本, 可以使用
<a href="http://pear.php.net/" class="link external">&raquo;&nbsp;PEAR</a> class 的
<a href="http://pear.php.net/package/Net_DNS" class="link external">&raquo;&nbsp;Net_DNS</a>
</p>
</p></blockquote>
</div>
<div class="refsect1 seealso" id="refsect1-function.getmxrr-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="checkdnsrr.html" class="function" rel="rdfs-seeAlso">checkdnsrr()</a> - 给指定的主机域名或者IP地址做DNS通信检查</span></li>
<li class="member"><span class="function"><a href="dns_get_record.html" class="function" rel="rdfs-seeAlso">dns_get_record()</a> - 获取指定主机的DNS记录</span></li>
<li class="member"><span class="function"><a href="gethostbyname.html" class="function" rel="rdfs-seeAlso">gethostbyname()</a> - 返回主机名对应的 IPv4地址。</span></li>
<li class="member"><span class="function"><a href="gethostbynamel.html" class="function" rel="rdfs-seeAlso">gethostbynamel()</a> - 获取互联网主机名对应的 IPv4 地址列表</span></li>
<li class="member"><span class="function"><a href="gethostbyaddr.html" class="function" rel="rdfs-seeAlso">gethostbyaddr()</a> - 获取指定的IP地址对应的主机名</span></li>
<li class="member">Linux 手册页面 <em>named(8)</em></li>
</ul>
</p>
</div>
</div></div></div></body></html>