title: Fatal error: Call to undefined function checkdnsrr()
body: <p>My application checks MX-records on the registration page. It works fine on my local development machine (Windows 7 with <em>WAMP Server</em>) and on my hosting account (Linux server). Recently I deployed the app on another hosting account and I got the following error when I tried to register an user:</p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function checkdnsrr() in
    D:\home\memorytreephoto.com\wwwroot\MyCMS\controls\register\validate_email.php
    on line 27</p>
  </blockquote>
  
  <p>My code is below:</p>
  
  <pre><code>&lt;?php
  // ------------------------------------------------------------
  // VALIDATE E-MAIL
  // ------------------------------------------------------------
  if (!filter_var($txbEmail, FILTER_VALIDATE_EMAIL)) {
      $emailNotValid = $email_error;
      $emailvalidate_error = 1;
  }
  
  if (filter_var($txbEmail, FILTER_VALIDATE_EMAIL)) {
      if (domain_exists($txbEmail)) {
          $emailvalidate_error = 0;
      } else {
          $emailNotValid = $emailmx_error;
          $emailvalidate_error = 1;
      }
  }
  
  // Check if MX-records are present
  function domain_exists($emailtocheck, $record = 'MX') {
      list($user, $domain) = preg_split('/@/', $emailtocheck);
      return checkdnsrr($domain, $record);
  }
  ?&gt;
  </code></pre>
  
  <p>Does someone know how to fix this?</p>