Current Location: Home> Function Categories> dns_check_record

dns_check_record

alias of checkdnsrr
Name:dns_check_record
Category:Network
Programming Language:php
One-line Description:alias for checkdnsrr().

Definition and usage

dns_check_record() function is an alias for checkdnsrr() function.

Example

Check DNS records:

 <?php
$domain = "gitbox.net" ;
if ( dns_check_record ( $domain , "MX" ) ) {
  echo "by" ;
} else {
  echo "failed" ;
}
?>

grammar

 dns_check_record ( host , type )

Parameter value

parameter describe
host Required. Specifies the IP address or host name to check.
type

Optional. Specify the type. It can be one of the following:

  • A
  • MX (default)
  • NS
  • SOA
  • PTR
  • CNAME
  • AAAA
  • A6
  • SRV
  • NAPTR
  • txt
  • ANY
Similar Functions
Popular Articles