asp实现限制一个ip只能访问一次的方法 <% '///////////////////////////////////////////////////// '// // '//作用:一个IP地址只允许访问本页一次 // '//引用:<!-- #include file="Check_Ip.asp" --> // '// // '///////////////////////////////////////////////////// 'Response.Charset = 936 '设置输出编码为简体中文 'Response.Buffer = false '关闭缓冲区 Dim Fso,ts,IpList,Cfs '设置Cookies函数 Function SetCookie() Response.Cookies("IsBrow") = "Brow" Response.Cookies("IsBrow").Expires = Date+365 End Function '记录IP地址函数 Function WriteIp(FileName, IpAddress) Set Fso = Server.CreateObject("Scripting.FileSystemObject") Set ts = Fso.OpenTextFile(Server.MapPath(FileName),8,true) ts.WriteLine IpAddress ts.Close Set ts = Nothing Set Fso = Nothing End Function '读取IP地址函数 Function ReadIpList(FileName) Set Fso = Server.CreateObject("Scripting.FileSystemObject") If Not Fso.FileExists(Server.MapPath(FileName)) Then CreateFile("Iplist.txt") Exit Function End If Set ts = Fso.OpenTextFile(Server.MapPath(FileName)) Iplist = ts.ReadAll ts.Close Set ts = Nothing Set Fso = Nothing ReadIpList = Iplist End Function '创建文件函数 Function CreateFile(FileName) Set Fso = Server.CreateObject("Scripting.FileSystemObject") Set Cfs = Fso.CreateTextFile(Server.MapPath(FileName)) Cfs.Close Set Cfs = Nothing Set Fso = Nothing End Function '关闭当前IE窗口函数(注:IE6下通过,其他浏览器未测试) Function CloseWindow() 'Response.Write "<script>window.location='javascript:window.opener=null;window.close();'</script>" Response.Redirect "http://www.baidu.com" End Function Ip = Request.ServerVariables("REMOTE_ADDR") '获取浏览者IP地址 Cookie = Request.Cookies("IsBrow") '获取当前Cookies 'Response.Write Cookie If Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "" Then Response.Write "本站不允许使用代理访问" Response.End() Else If Cookie = "Brow" Then CloseWindow() Else If Instr(ReadIpList("Iplist.txt"),Ip) <>0 Then CloseWindow() Else WriteIp "Iplist.txt" , Ip End If SetCookie() End If End If %>
上传时间: 2016-07-14
上传用户:helei0915
研制了一种由自动巡航无人驾驶船、环境生态监控装置和远程服务平台3部分组成的水产养殖在线监控设备,在提高养殖监控效率和降低监控成本的同时,实现养殖过程的实时在线监测和精准调控。综合应用自动化航向航速控制、自动导航定位和防碰撞技术,实现无人驾驶船的自动巡航功能。利用无人船运载自制的多功能环境生态监控装置,实现水质指标(温度、溶解氧、p H值和氧化还原能力)以及鱼、虾生态信息的实时定点获取,并能根据用户需求调整检测指标。无人船在大幅减少环境生态监控装置数量的同时,有效提高了装置的检测精度。将统计分析、信息融合、组态控制、嵌入式等技术相结合,用于对数据进行处理与分析,实现养殖现场环境调控设备的精准控制。试验表明,该监控设备能满足规模化水产养殖需求,对推广应用精准农业技术与装置、进行水产养殖过程监测与精准调控有积极的促进作用。
标签: 自动巡航无人驾驶
上传时间: 2022-06-16
上传用户:
MATLAB语言与自动控制系统设计
上传时间: 2013-05-15
上传用户:eeworm
自动检测技术 上海电机学院精品课件 PPT版 (New)
上传时间: 2013-07-12
上传用户:eeworm
传感器与自动检测技术演示教程 PPT格式
上传时间: 2013-07-16
上传用户:eeworm
自动变速器结构原理图册
上传时间: 2013-04-15
上传用户:eeworm
自动变速器
标签: 自动变速器
上传时间: 2013-06-18
上传用户:eeworm
机器人辅助模具自动抛光研究及发展趋势
上传时间: 2013-08-04
上传用户:eeworm
电压极冲片自动叠片硬质合金级进模设计
上传时间: 2013-07-28
上传用户:eeworm
现代汉语自动分析--Visual+C++实现
上传时间: 2013-08-01
上传用户:eeworm