1. Go to this page and download the library: Download jinomial/laravel-dns library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Returns a DnsRecordCollection after resolving all promises
$records = Dns::socket('doh')->query($queries, null, ['async' => true]);
$record->host; // The host name
$record->type; // The record type (e.g., "A", "MX")
$record->ttl; // Time to live
$record->data; // The record value (IP, Target, etc.)
$record->class; // Usually "IN"
$record->extras; // Array of driver-specific raw data
public function boot(): void
{
$this->app->make(\Jinomial\LaravelDns\DnsManager::class)->extend('custom', function ($app, $name, $config) {
return new MyCustomDriver($name, $config);
});
}