1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00
dns/examples/ptr-record.php
Aaron Piotrowski d26f9bb44f Remove amphp/file and amphp/uri dependencies (#80)
Replaces async loading of hosts and resolver files with blocking reads by default.

Closes #78.
2019-01-04 18:20:52 +01:00

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);
}
});