checkdnsrr
Description
The checkdnsrr of Network for PHP check DNS records corresponding to a given Internet host name or IP address.
Syntax
checkdnsrr ( string $host [, string $type = "MX" ] ) : bool
Parameters
host
host may either be the IP address in dotted-quad notation or the host name.
type
type may be any one of: A, MX, NS, SOA, PTR, CNAME, AAAA, A6, SRV, NAPTR, TXT or ANY.
Return
Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred.
Examples
1 · host
<? $host = "osbo.com"; $return = checkdnsrr($host); var_export($return); ?>
true
2 · type
<? $host = "osbo.com"; $type = "A"; $return = checkdnsrr($host, $type); var_export($return); ?>
true
Links
Network
- closelog
- dns_check_record
- dns_get_mx
- dns_get_record
- fsockopen
- gethostbyaddr
- gethostbyname
- gethostbynamel
- gethostname
- getmxrr
- getprotobyname
- getprotobynumber
- getservbyname
- getservbyport
- header
- header_register_callback
- header_remove
- headers_list
- headers_sent
- http_response_code
- inet_ntop
- inet_pton
- ip2long
- long2ip
- openlog
- pfsockopen
- setcookie
- setrawcookie
- socket_get_status
- socket_set_blocking
- socket_set_timeout
- syslog