protected static function getReferrerDns($Referrer = false)
    {
        if ($Referrer === false)
        {
            $http_referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown' ;
        }
        else
        {
            $http_referrer = $Referrer;
        }
        //nur den host Anteil prüfen
        $referrer_DNS = parse_url( $http_referrer, PHP_URL_HOST );
        if ($referrer_DNS === NULL)
        {
            //try this...
            $referrer_DNS = @parse_url( 'http://'.$http_referrer, PHP_URL_HOST );
            if ($referrer_DNS === NULL ||
                $referrer_DNS === false)
            {
                //wtf...
                return false;
            }
        }
        return $referrer_DNS;
    }
protected static function getReferrerDns($Referrer = false)
    {
        if ($Referrer === false)
        {
            $http_referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'unknown' ;
        }
        else
        {
            $http_referrer = $Referrer;
        }
        //nur den host Anteil prüfen
        $referrer_DNS = parse_url( $http_referrer, PHP_URL_HOST );
        if ($referrer_DNS === NULL)
        {
            //try this...
            $referrer_DNS = @parse_url( 'http://'.$http_referrer, PHP_URL_HOST );
            if ($referrer_DNS === NULL ||
                $referrer_DNS === false)
            {
                //wtf...
                return false;
            }
        }
        return $referrer_DNS;
    }
protected static function getReferrerDns ( $ Referrer = false ) { if ( $ Referrer === false ) { $ http_referrer = isset ( $ _SERVER [ 'HTTP_REFERER' ] ) ? $ _SERVER [ 'HTTP_REFERER' ] : 'unknown' ; } else { $ http_referrer = $ Referrer ; } //nur den host Anteil prüfen $ referrer_DNS = parse_url ( $ http_referrer , PHP_URL_HOST ) ; if ( $ referrer_DNS === NULL ) { //try this... $ referrer_DNS = @ parse_url ( 'http://' . $ http_referrer , PHP_URL_HOST ) ; if ( $ referrer_DNS === NULL || $ referrer_DNS === false ) { //wtf... return false ; } } return $ referrer_DNS ; }
Get Root Domain from Referrer

@param string $Referrer
@return boolean|string   false: no dns, string: Domain
Get Root Domain from Referrer