Posted By

dynamicnet on 11/10/11


Tagged

DNS


Versions (?)

get weight sorted mx dns record for a domain


 / Published in: PHP
 

  1. function getWeightSortedMx( $domain ) {
  2.  
  3. getmxrr( $domain , $mxhosts , $weight );
  4.  
  5. $mxhosts = array_map("strtolower" , $mxhosts);
  6.  
  7. array_multisort( $weight , SORT_ASC , SORT_NUMERIC ,
  8. $mxhosts , SORT_ASC , SORT_STRING );
  9.  
  10. return $mxhosts;
  11. }

Report this snippet  

You need to login to post a comment.