Current Location: Home> Function Categories> getmxrr

getmxrr

Get the MX record corresponding to the Internet hostname
Name:getmxrr
Category:Network
Programming Language:php
One-line Description:Returns the MX record of the specified Internet hostname.

Definition and usage

getmxrr() function returns the MX record of the specified Internet host name.

Example

Returns the details of the Mail Exchange Record (MX Record):

 <?php
$domain = "gitbox.net" ;
if ( getmxrr ( $domain , $mx_details ) ) {
  foreach ( $mx_details as $key => $value ) {
    echo " $key => $value <br>" ;
  }
}
?>

grammar

 getmxrr ( host , mxhosts , weight )

Parameter value

parameter describe
host Required. Specify the host name.
mxhosts Required. Array, used to specify the list of found MX records.
Weight Optional. Array, used to specify the collected weight information.
Similar Functions
Popular Articles