Skip to content

Instantly share code, notes, and snippets.

@KalleZ
Created October 5, 2018 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KalleZ/1fb56e7ffa9c01ed7389d154ba87f030 to your computer and use it in GitHub Desktop.
Save KalleZ/1fb56e7ffa9c01ed7389d154ba87f030 to your computer and use it in GitHub Desktop.
<?php
const SERVER_URL = 'php.net';
var_dump(checkdnsrr());
var_dump(checkdnsrr(SERVER_URL));
foreach(['A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'] as $type) {
printf('%s: %s%s', $type, (checkdnsrr(SERVER_URL, type) ? 'Passed' : 'Failed'), PHP_EOL);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment