Exemplo n.º 1
0
    public static bool IsWebSearch()
    {
        string user_agent = HttpContext.Current.Request.UserAgent;

        if (null == user_agent || string.Empty == user_agent)
        {
            return(true);
        }
        else
        {
            user_agent = user_agent.ToLower();
        }

        for (int i = 0; i < _WebSearchList.Length; i++)
        {
            if (-1 != user_agent.IndexOf(_WebSearchList[i]))
            {
                return(true);
            }
        }
        return(UserBrowser.Equals("Unknown"));
    }