增加限制模拟器2006-2-11

<%
    //***************************************
    //增加限制模拟器2006-2-11(小虎)
    //***************************************
    int isok=1;
    string mot_heard ="";
   
    if(Request.Headers["User-Agent"]!=null && Request.Headers["User-Agent"]!="")
    {
        mot_heard="3g"+Request.Headers["User-Agent"].ToString();
    }
   
 if (mot_heard.IndexOf("Opera")>0 || mot_heard.IndexOf("NSPlayer")>0 || mot_heard.IndexOf("contype")>0 || mot_heard.IndexOf("RealMedia")>0 || mot_heard.IndexOf("Mozilla")> 0 || mot_heard.IndexOf("ccWAP-Browser")> 0 || mot_heard.IndexOf("M3Gate")> 0 || mot_heard.IndexOf("WinWAP")> 0 || mot_heard.IndexOf("WAP/3.2")> 0 || mot_heard.IndexOf("Windows+NT")> 0 || mot_heard.IndexOf("timewe.net")> 0 || mot_heard.IndexOf("NEC-N820 YES")> 0)
 {
  isok=-1;
 }

 if((mot_heard.IndexOf("MOT-")>0) || (mot_heard.IndexOf("Windows+CE")>0) || (mot_heard.IndexOf("Nokia")>0))
 {
  isok=1;
 }

    if (isok==-1)
    {
        if(conn!=null)
        {
            conn.Close();
        }
        Response.Redirect("down_error.aspx",true);
    }
    //--------------------------------------------
%>

posted @ 2006-07-26 13:41  wenanry  阅读(234)  评论(0编辑  收藏  举报