PHP dns_check_record() Function

PHP Network Reference : Check DNS records

Definition and Usage

The dns_check_record() function is an alias of the checkdnsrr() function.

Syntax

dns_check_record(host, type)

Parameter Values

Parameter Description
host Required. Specifies an IP address or host name to check
type Optional. Specifies the type. Can be one of the following:
  • A
  • MX (default)
  • NS
  • SOA
  • PTR
  • CNAME
  • AAAA
  • A6
  • SRV
  • NAPTR
  • TXT
  • ANY

Technical Details

Return Value: TRUE if any records are found, FALSE otherwise
PHP Version: 5.0+

❮ PHP Network Reference