首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

ASP实例:过滤不文明字符

Function badchar(str)  badstr="不文明字符列表,用|分开(因发表时不能含有那些字符,所以不能贴出。)"  badword=split(badstr,"|")  For i=0 to Ubound(badword)  If instr(str,badword(i)) > 0 then  badchar=True  Exit For  Else  badchar=False  End If  Next  End Function  Function cutbadchar(str)  badstr="不文明字符列表,用|分开(因发表时不能含有那些字符,所以不能贴出。)"  badword=split(badstr,"|") ...
类别:网页编程 - ASP技术    查看:108    更新:2014-05-19

ASP实例:限制ip投票

要求同一IP只能对同一用户投票一次,贴Asp代码: <% db_conn(dbs) Voteusername=trim(request.QueryString("username")) rs_create("select username from [user] where username ='"&Voteusername&"'") if rs.eof and rs.bof then response.write "错误的参数,请从正确访问!" response.end() end if '第一种情况是第一次点击,cookies为空,ip为空 '第二种情况是点第二个人投票,第一个人的cookies存在,第二个的的cookies不存在,但是ip存在 '第三种情况是换ip投票,cookies存在,ip为空 if Request.cookies("dwww")(""&Voteusername&"")="&...
类别:网页编程 - ASP技术    查看:90    更新:2014-05-04