<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.network.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.checkdnsrr.php',
    1 => 'checkdnsrr',
    2 => 'Check DNS records corresponding to a given Internet host name or IP address',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Network Functions',
  ),
  'prev' => 
  array (
    0 => 'ref.network.php',
    1 => 'Network Functions',
  ),
  'next' => 
  array (
    0 => 'function.closelog.php',
    1 => 'closelog',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/network/functions/checkdnsrr.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.checkdnsrr" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">checkdnsrr</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">checkdnsrr</span> &mdash; <span class="dc-title">Check DNS records corresponding to a given Internet host name or IP address</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.checkdnsrr-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>checkdnsrr</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$hostname</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$type</code><span class="initializer"> = &quot;MX&quot;</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Searches DNS for records of type <code class="parameter">type</code>
   corresponding to <code class="parameter">hostname</code>. 
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.checkdnsrr-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">hostname</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">hostname</code> may either be the IP address in
       dotted-quad notation or the host name.
      </p>
     </dd>
    
    
     <dt><code class="parameter">type</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">type</code> may be any one of: A, MX, NS, SOA,
       PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.checkdnsrr-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if any records are found; returns <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> if no records
   were found or if an error occurred.
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.checkdnsrr-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    For compatibility with Windows before this was implemented, then try the
    <a href="https://pear.php.net/" class="link external">&raquo;&nbsp;PEAR</a> class
    <a href="https://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">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.dns-get-record.php" class="function" rel="rdfs-seeAlso">dns_get_record()</a> - Fetch DNS Resource Records associated with a hostname</span></li>
    <li><span class="function"><a href="function.getmxrr.php" class="function" rel="rdfs-seeAlso">getmxrr()</a> - Get MX records corresponding to a given Internet host name</span></li>
    <li><span class="function"><a href="function.gethostbyaddr.php" class="function" rel="rdfs-seeAlso">gethostbyaddr()</a> - Get the Internet host name corresponding to a given IP address</span></li>
    <li><span class="function"><a href="function.gethostbyname.php" class="function" rel="rdfs-seeAlso">gethostbyname()</a> - Get the IPv4 address corresponding to a given Internet host name</span></li>
    <li><span class="function"><a href="function.gethostbynamel.php" class="function" rel="rdfs-seeAlso">gethostbynamel()</a> - Get a list of IPv4 addresses corresponding to a given Internet host
   name</span></li>
    <li>the named(8) manual page</li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>