PiwikTracker::getCurrentHost PHP Method

getCurrentHost() protected static method

If current URL is "http://example.org/dir1/dir2/index.php?param1=value1¶m2=value2" will return "http://example.org"
protected static getCurrentHost ( ) : string
return string
    protected static function getCurrentHost()
    {
        if (isset($_SERVER['HTTP_HOST'])) {
            return $_SERVER['HTTP_HOST'];
        }
        return 'unknown';
    }