function _getMx($host)
    {
        $mx = array();

        if ($this->withNetDns) {
            $res = $this->_loadNetDns();
            if (is_a($res, 'PEAR_Error')) {
                return $res;
            }

            $response = $this->resolver->query($host, 'MX');
            if (!$response) {
                return false;
            }

            foreach ($response->answer as $rr) {
                if ($rr->type == 'MX') {
                    $mx[$rr->exchange] = $rr->preference;
                }
            }
        } else {
            $mxHost = array();
            $mxWeight = array();

            if (!getmxrr($host, $mxHost, $mxWeight)) {
                return false;
            }
            for ($i = 0; $i < count($mxHost); ++$i) {
                $mx[$mxHost[$i]] = $mxWeight[$i];
            }
        }

        asort($mx);
        return $mx;
    }
function _getMx($host)
    {
        $mx = array();

        if ($this->withNetDns) {
            $res = $this->_loadNetDns();
            if (is_a($res, 'PEAR_Error')) {
                return $res;
            }

            $response = $this->resolver->query($host, 'MX');
            if (!$response) {
                return false;
            }

            foreach ($response->answer as $rr) {
                if ($rr->type == 'MX') {
                    $mx[$rr->exchange] = $rr->preference;
                }
            }
        } else {
            $mxHost = array();
            $mxWeight = array();

            if (!getmxrr($host, $mxHost, $mxWeight)) {
                return false;
            }
            for ($i = 0; $i < count($mxHost); ++$i) {
                $mx[$mxHost[$i]] = $mxWeight[$i];
            }
        }

        asort($mx);
        return $mx;
    }
function _getMx ( $ host ) { $ mx = array ( ) ; if ( $ this -> withNetDns ) { $ res = $ this -> _loadNetDns ( ) ; if ( is_a ( $ res , 'PEAR_Error' ) ) { return $ res ; } $ response = $ this -> resolver -> query ( $ host , 'MX' ) ; if ( ! $ response ) { return false ; } foreach ( $ response -> answer as $ rr ) { if ( $ rr -> type == 'MX' ) { $ mx [ $ rr -> exchange ] = $ rr -> preference ; } } } else { $ mxHost = array ( ) ; $ mxWeight = array ( ) ; if ( ! getmxrr ( $ host , $ mxHost , $ mxWeight ) ) { return false ; } for ( $ i = 0 ; $ i < count ( $ mxHost ) ; ++ $ i ) { $ mx [ $ mxHost [ $ i ] ] = $ mxWeight [ $ i ] ; } } asort ( $ mx ) ; return $ mx ; }
Recieve mx rexords for a spciefied host

The MX records

@access private
@param string $host mail host
@return mixed sorted
Recieve mx rexords for a spciefied host