source/Core/Utils.php
public function extractDomain($sHost)
    {
        $oStr = getStr();
        if (!$oStr->preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $sHost) &&
            ($iLastDot = strrpos($sHost, '.')) !== false
        ) {
            $iLen = $oStr->strlen($sHost);
            if (($iNextDot = strrpos($sHost, '.', ($iLen - $iLastDot + 1) * -1)) !== false) {
                $sHost = trim($oStr->substr($sHost, $iNextDot), '.');
            }
        }

        return $sHost;
    }
public function extractDomain($sHost)
    {
        $oStr = getStr();
        if (!$oStr->preg_match('/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $sHost) &&
            ($iLastDot = strrpos($sHost, '.')) !== false
        ) {
            $iLen = $oStr->strlen($sHost);
            if (($iNextDot = strrpos($sHost, '.', ($iLen - $iLastDot + 1) * -1)) !== false) {
                $sHost = trim($oStr->substr($sHost, $iNextDot), '.');
            }
        }

        return $sHost;
    }
public function extractDomain ( $ sHost ) { $ oStr = getStr ( ) ; if ( ! $ oStr -> preg_match ( '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/' , $ sHost ) && ( $ iLastDot = strrpos ( $ sHost , '.' ) ) !== false ) { $ iLen = $ oStr -> strlen ( $ sHost ) ; if ( ( $ iNextDot = strrpos ( $ sHost , '.' , ( $ iLen - $ iLastDot + 1 ) * - 1 ) ) !== false ) { $ sHost = trim ( $ oStr -> substr ( $ sHost , $ iNextDot ) , '.' ) ; } } return $ sHost ; }
Extracts domain name from given host

@param string $sHost host name

@return string
Extracts domain name from given host