checkdnsrr

bool checkdnsrr(string host, [string type]) 
host Hostname or IP address to check
type Type of record for which to check

Checks for DNS resource records for the given host.

Returns:

TRUE if a record can be found; FALSE on error

Description:

Performs a DNS lookup on the specified host (either a hostname or IP address) and returns TRUE if a record of the specified type is found. This function can look up the following record types:

Record Type Details
A Address: Defined in RFC 1035.
ALL Any of the valid types.
CNAME Canonical Name: Defined in RFC 1035.
MX Mail Exchanger: Defined in RFC 1035.
NS Name Server: Defined in RFC 1035.
PTR Pointer: Defined in RFC 1035.
SOA Start of Authority: Defined in RFC 1035.

If no record type is specified, ...

Get PHP Functions Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.