Contao\Environment::httpUserAgent PHP 메소드

httpUserAgent() 보호된 정적인 메소드

Return the user agent as string
protected static httpUserAgent ( ) : string
리턴 string The user agent string
    protected static function httpUserAgent()
    {
        $ua = strip_tags($_SERVER['HTTP_USER_AGENT']);
        $ua = preg_replace('/javascript|vbscri?pt|script|applet|alert|document|write|cookie/i', '', $ua);
        return substr($ua, 0, 255);
    }