getmxrr
Description
Syntax
getmxrr( string $hostname, array &$hosts, array &$weights = null ): bool
Parameters
hostname
The Internet host name.
mxhosts
A list of the MX records found is placed into the array mxhosts.
weights
If the weights array is given, it will be filled with the weight information gathered.
Return
Returns true if any records are found; returns false if no records were found or if an error occurred.
Examples
1 · hostname mxhosts
<? $hostname = "php.net"; $return = getmxrr($hostname, $mxhosts); print_r($mxhosts);
Array ( [0] => php-smtp4-ip4.php.net )
2 · weights
<? $hostname = "php.net"; $return = getmxrr($hostname, $mxhosts, $weights); print_r($weights);
Array ( [0] => 0 )
3 · return
<? $hostname = "php.net"; $return = getmxrr($hostname, $mxhosts); var_export($return);
true
Links
Network
- checkdnsrr
- closelog
- dns_check_record
- dns_get_mx
- dns_get_record
- fsockopen
- gethostbyaddr
- gethostbyname
- gethostbynamel
- gethostname
- 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