uTools-Manuals/docs/php/checkdnsrr.html
2019-04-08 23:22:26 +08:00

141 lines
4.8 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>给指定的主机域名或者IP地址做DNS通信检查</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.checkdnsrr" class="refentry">
<div class="refnamediv">
<h1 class="refname">checkdnsrr</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">checkdnsrr</span> &mdash; <span class="dc-title">给指定的主机域名或者IP地址做DNS通信检查</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.checkdnsrr-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>checkdnsrr</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$host</code></span>
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$type</code><span class="initializer"> = &quot;MX&quot;</span></span>
] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
根据不同记录(<code class="parameter">type</code>)类型查询主机(<code class="parameter">host</code>相应的DNS记录。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.checkdnsrr-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">host</code></dt>
<dd>
<p class="para">
主机(<code class="parameter">host</code>可以是一个IP地址也可以是域名。
</p>
</dd>
<dt>
<code class="parameter">type</code></dt>
<dd>
<p class="para">
解析记录类型(<code class="parameter">type</code>可能是下面这些类型中的任何一个AMXNSSOAPTRCNAMEAAAAA6 SRVNAPTRTXT 或者 ANY。
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.checkdnsrr-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
如果记录能找到,就返回<strong><code>TRUE</code></strong>如果查找不到该DNS记录或者发生了错误就返回<strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.checkdnsrr-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>
<tr>
<td>5.2.4</td>
<td>
增加了TXT的记录<code class="parameter">类型</code>
</td>
</tr>
<tr>
<td>5.0.0</td>
<td>
增加了AAAA的记录<code class="parameter">类型</code>
</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 notes" id="refsect1-function.checkdnsrr-notes">
<h3 class="title">注释</h3>
<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>扩展包里面提供的
<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.checkdnsrr-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<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="getmxrr.html" class="function" rel="rdfs-seeAlso">getmxrr()</a> - 获取互联网主机名对应的 MX 记录</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"><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">the named(8) manual page</li>
</ul>
</p>
</div>
</div></div></div></body></html>