src/Models/Website.php
public static function currentServerName()
    {
        if (! empty(env('SERVER_NAME'))) {
            $BASE_URL = env('SERVER_NAME');
        } elseif (! empty($_SERVER['SERVER_NAME'])) {
            $BASE_URL = $_SERVER['SERVER_NAME'];
        } elseif (! empty($_SERVER['HTTP_HOST'])) {
            $BASE_URL = $_SERVER['HTTP_HOST'];
        } else {
            $BASE_URL = 'empty';
        }
        return $BASE_URL;
    }
public static function currentServerName()
    {
        if (! empty(env('SERVER_NAME'))) {
            $BASE_URL = env('SERVER_NAME');
        } elseif (! empty($_SERVER['SERVER_NAME'])) {
            $BASE_URL = $_SERVER['SERVER_NAME'];
        } elseif (! empty($_SERVER['HTTP_HOST'])) {
            $BASE_URL = $_SERVER['HTTP_HOST'];
        } else {
            $BASE_URL = 'empty';
        }
        return $BASE_URL;
    }
public static function currentServerName ( ) { if ( ! empty ( env ( 'SERVER_NAME' ) ) ) { $ BASE_URL = env ( 'SERVER_NAME' ) ; } elseif ( ! empty ( $ _SERVER [ 'SERVER_NAME' ] ) ) { $ BASE_URL = $ _SERVER [ 'SERVER_NAME' ] ; } elseif ( ! empty ( $ _SERVER [ 'HTTP_HOST' ] ) ) { $ BASE_URL = $ _SERVER [ 'HTTP_HOST' ] ; } else { $ BASE_URL = 'empty' ; } return $ BASE_URL ; }
Determine the current website server name.

This doesn't contain any URL identifiers such as 'http://', just
the host name (e.g. www.myserver.com).

@return	string
Determine the current website server name .