1
0
mirror of https://github.com/danog/dns.git synced 2024-11-27 04:24:48 +01:00
dns/examples/ptr-record.php
Aaron Piotrowski b6df154cd9
Update examples
2020-11-09 10:47:03 -06:00

14 lines
226 B
PHP

<?php
require __DIR__ . "/_bootstrap.php";
use Amp\Dns;
$ip = $argv[1] ?? "8.8.8.8";
try {
pretty_print_records($ip, Dns\query($ip, Dns\Record::PTR));
} catch (Dns\DnsException $e) {
pretty_print_error($ip, $e);
}