public function referrerIsSearchEngine()
    {
        $referrerHostExploded = explode('.', $this->getReferrerDomain());
        $numberOfPieces = count($referrerHostExploded);
        $positionToCheck = $numberOfPieces - 2;

        if (!isset($referrerHostExploded[$positionToCheck])) {
            return false;
        }

        if (strlen($referrerHostExploded[$positionToCheck]) <= 3) {
            --$positionToCheck;

            if (!isset($referrerHostExploded[$positionToCheck])) {
                return false;
            }
        }

        return in_array(
            $referrerHostExploded[$positionToCheck],
            [
                'baidu',
                'bing',
                'bleikko',
                'duckduckgo',
                'exalead',
                'gigablast',
                'google',
                'munax',
                'qwant',
                'sogou',
                'yahoo',
                'yandex',
            ]
        );
    }
public function referrerIsSearchEngine()
    {
        $referrerHostExploded = explode('.', $this->getReferrerDomain());
        $numberOfPieces = count($referrerHostExploded);
        $positionToCheck = $numberOfPieces - 2;

        if (!isset($referrerHostExploded[$positionToCheck])) {
            return false;
        }

        if (strlen($referrerHostExploded[$positionToCheck]) <= 3) {
            --$positionToCheck;

            if (!isset($referrerHostExploded[$positionToCheck])) {
                return false;
            }
        }

        return in_array(
            $referrerHostExploded[$positionToCheck],
            [
                'baidu',
                'bing',
                'bleikko',
                'duckduckgo',
                'exalead',
                'gigablast',
                'google',
                'munax',
                'qwant',
                'sogou',
                'yahoo',
                'yandex',
            ]
        );
    }
public function referrerIsSearchEngine ( ) { $ referrerHostExploded = explode ( '.' , $ this -> getReferrerDomain ( ) ) ; $ numberOfPieces = count ( $ referrerHostExploded ) ; $ positionToCheck = $ numberOfPieces - 2 ; if ( ! isset ( $ referrerHostExploded [ $ positionToCheck ] ) ) { return false ; } if ( strlen ( $ referrerHostExploded [ $ positionToCheck ] ) <= 3 ) { -- $ positionToCheck ; if ( ! isset ( $ referrerHostExploded [ $ positionToCheck ] ) ) { return false ; } } return in_array ( $ referrerHostExploded [ $ positionToCheck ] , [ 'baidu' , 'bing' , 'bleikko' , 'duckduckgo' , 'exalead' , 'gigablast' , 'google' , 'munax' , 'qwant' , 'sogou' , 'yahoo' , 'yandex' , ] ) ; }
Referrer is search engine.

@return bool Is search engine
Referrer is search engine .