[Tickets #7374] Re: speed up hostname lookups on broken DNS

bugs at horde.org bugs at horde.org
Mon Sep 22 18:06:11 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7374
------------------------------------------------------------------------------
  Ticket             | 7374
  Updated By         | adrieder at sbox.tugraz.at
  Summary            | speed up hostname lookups on broken DNS
  Queue              | Horde Framework Packages
  Version            | HEAD
  Type               | Enhancement
  State              | Feedback
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


adrieder at sbox.tugraz.at (2008-09-22 14:06) wrote:

That's it, if using an external pear module it ok :-)

The following cod works fine:

<?php
require_once 'Net/DNS.php';

$resolver = new Net_DNS_Resolver();
$now = time();

putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
require_once 'Net/DNS.php';

$response = $resolver->query('153.19.206.48');
if ($response) {
     foreach ($response->answer as $rr) {
         $rr->display();
     }
}
print time() - $now . "\n";
?>






More information about the bugs mailing list