netdns2
netdns2 copied to clipboard
Feature Request: multiple queries in parallel to speed up things
it would be really nice if this library supports doing multiple queries in parallel so that it will reduce the processing time.
at the moment I am doing it like below:
$resolver = new \Net_DNS2_Resolver([
'nameservers' => $nameServers,
'ns_random' => true
]);
$types = ['A', 'NS', 'TXT', 'MX'];
foreach ($types as $type) {
$response = $resolver->query($hostName, $type);
// response processing
}
Did you try $response = $resolver->query($hostName, '*')
?
maybe https://github.com/spatie/async ?