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
To show Gibbs phenomenon, using FFTs to sum Fourier Give the curve plot at the end of the simulation
标签: the phenomenon simulati Fourier
上传时间: 2014-01-07
上传用户:佳期如梦
In the end, I don t understand the PC, so I will fine the date to you. I only know flash.
标签: the understand flash date
上传时间: 2016-10-30
上传用户:lhc9102
Long-distance rmi transfers java to realize may realize a service end many client side conversation contact surface to be artistic
标签: realize Long-distance conversation transfers
上传时间: 2017-01-21
上传用户:cuiyashuo
Mastering Dojo will teach you how to build an Internet application that will impress your end users and delight you while you’re writing it. The book also explains Dojo’s JavaScript underpinnings, both for newcomers and for refugees from other languages.
标签: will application Mastering Internet
上传时间: 2017-07-02
上传用户:chenbhdt
Use of this source code is subject to the terms of the Microsoft end-user
标签: Microsoft the end-user subject
上传时间: 2013-12-18
上传用户:rishian
How to desC1rs yea !# 4as end e
上传时间: 2013-12-17
上传用户:yangbo69
how to search for the biggest end folder from your sistem (under Linux)
标签: biggest folder search sistem
上传时间: 2013-12-19
上传用户:TF2015
This code detects memory leaks in embedded VC++ almost the same way crtdbg does in VC++. At the end of program execution it will display in the debug window if there were any memory leaks and how the memory looks so you can identify where your memory leak occurred. It will display in the debug window a message saying no memory leaks detected if there are no memory leaks. Similar to what crtdbg.h does in VC++. The code detects memory leaks generated with calls to new and delete operators in C++. The code doesn t detect memory leaks generated with C functions: malloc, calloc, free, but that can be done in the future. Let me know and I will program it.
标签: the embedded detects almost
上传时间: 2015-05-07
上传用户:comua
This will sample all 8 A/D-channels by the continous mode. Each end of conversion will call an interrupt routine, where the AD-channel is put to Port4[2..0] and the upper nibble of the result is put to Port4[7..4]. Port 4 is connected to the user LEDs of the FlashCan100P Evaluation-Board
标签: will D-channels conversion continous
上传时间: 2013-12-09
上传用户:zm7516678