The recommended way is by Composer.
composer require sztyup/dns
#Usage
$client = new \Sztyup\Dns\SecureClient();
$client->query('google.com', 'A');
This package is available under the MIT License (MIT). Please see License File for more information.