checkdnsrr
Description
The checkdnsrr of Network for PHP checks DNS records corresponding to a given Internet host name or IP address.
Syntax
checkdnsrr( string $hostname, string $type = "MX" ): bool
Parameters
hostname
hostname 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 · hostname
<? $hostname = "osbo.com"; $return = checkdnsrr($hostname); var_export($return);
true
2 · type
<? $hostname = "osbo.com"; $type = "A"; $return = checkdnsrr($hostname, $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_clear_last_response_headers
- http_get_last_response_headers
- http_response_code
- inet_ntop
- inet_pton
- ip2long
- long2ip
- openlog
- pfsockopen
- setcookie
- setrawcookie
- socket_get_status
- socket_set_blocking
- socket_set_timeout
- syslog