zoukankan      html  css  js  c++  java
  • asp.net2 统一搜索引擎关键字编码[转]

    程序代码

    using System;
    using System.Data;
    using System.Configuration;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Text.RegularExpressions;
    using System.Text;

    /// <summary>
    /// 搜索引擎处理
    /// </summary>

    public class ExJudgeSystem
    {
        
    public ExJudgeSystem()
        
    {

        }

        
    初始化变量

        
    搜索引擎关键字

        
    //判断否为搜索引擎爬虫,并返回其类型
        public string isCrawler(string SystemInfo)
        
    {
            
    string[] BotList = new string[] "Google""Baidu""MSN""Yahoo""TMCrawler""iask""Sogou" };
            
    foreach (string Bot in BotList)
            
    {
                
    if (SystemInfo.ToLower().Contains(Bot.ToLower()))
                
    {
                    
    return Bot;
                }

            }

            
    return "null";
        }

    }

  • 相关阅读:
    【leetcode】Climbing Stairs (easy)
    【leetcode】Best Time to Buy and Sell 3 (hard) 自己做出来了 但别人的更好
    【leetcode】Best Time to Buy and Sell 2(too easy)
    【leetcode】Best Time to Buy and Sell (easy)
    【leetcode】Single Number II (medium) ★ 自己没做出来....
    【leetcode】Single Number (Medium) ☆
    【leetcode】Valid Sudoku (easy)
    【leetcode】Two Sum (easy)
    Oracle-11-主键约束
    Codeforces444A_DZY Loves Physics
  • 原文地址:https://www.cnblogs.com/ghx88/p/1014349.html
Copyright © 2011-2022 走看看