<%
'我用Session代替IP。
If Session(lastTime)=Nothing Then Session("lastTime")=CStr(Hour(Now) & "_" & Minute(Now))
If Session("lastTime")=CStr(Hour(Now) & "_" & Minute(Now)) Then
If Session("lastTimeCount")=Nothing Then
Session("lastTimeCount")=1
Else
Session("lastTimeCount")=Session("lastTimeCount")+1
End If
Else
Session("lastTime")=CStr(Hour(Now) & "_" & Minute(Now))
End If
if Session("lastTimeCount")>10 Then
Response.End
End If
%>
程序代码:
<%
If Session("lastTime")="" Then Session("lastTime")=Hour(Now) & "_" & Minute(Now)
If Session("lastTime")<>Hour(Now) & "_" & Minute(Now) Then
Session("lastTime")=Hour(Now) & "_" & Minute(Now)
Session("lastTimeCount")=0
End If
If Session("lastTime")=Hour(Now) & "_" & Minute(Now) Then
If Session("lastTimeCount")="" Then
Session("lastTimeCount")=1
Else
Session("lastTimeCount")=Session("lastTimeCount")+1
End If
Else
Session("lastTime")=Hour(Now) & "_" & Minute(Now)
End If
if Session("lastTimeCount")>10 Then
Response.End
End If
%>