1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00
dns/examples/ptr-record.php
2017-09-12 17:05:40 +02:00

17 lines
293 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\ResolutionException $e) {
pretty_print_error($ip, $e);
}
});