mirror of
https://github.com/danog/dns-over-https.git
synced 2024-12-03 09:47:45 +01:00
17 lines
286 B
PHP
17 lines
286 B
PHP
<?php
|
|
|
|
require __DIR__ . "/_bootstrap.php";
|
|
|
|
use Amp\Dns;
|
|
use Amp\Loop;
|
|
|
|
Loop::run(function () {
|
|
$ip = "8.8.8.8";
|
|
|
|
try {
|
|
pretty_print_records($ip, yield Dns\query($ip, Dns\Record::PTR));
|
|
} catch (Dns\DnsException $e) {
|
|
pretty_print_error($ip, $e);
|
|
}
|
|
});
|