<%
sub nocache()
Response.Expires = -9999
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-ctrol","no-cache"
end sub
dim StartTime
StartTime=Timer()
Function GetTimeOver()
if Timer()>=StartTime then
if Timer() - StartTime >1 then
getTimeOver = FormatNumber(Timer() - StartTime, 5,
true)& "秒"
Else
getTimeOver = FormatNumber((Timer() - StartTime) *
1000, 3, true)& "毫秒"
End If
Else
if Timer()+86400-StartTime>1 then
getTimeOver = FormatNumber(Timer()+86400-StartTime, 5,
true)& "秒"
Else
getTimeOver = FormatNumber((Timer()+86400-StartTime) *
1000, 3, true)& "毫秒"
End If
end If
End Function
sub echo(str)
response.write str
End sub
sub echoCookies(Key,Value,Expires)
DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
Response.Cookies(Key)=""&Value&""
if Expires<>0 then Response.Cookies(Key).Expires=date+Expires
Response.Cookies(Key).Path=DomainPath
End sub
sub CleanCookies()
DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
For Each objCookie In Request.Cookies
Response.Cookies(objCookie)= ""
Response.Cookies(objCookie).Path=DomainPath
Next
End sub
sub Alert(msg,goUrl)
msg = replace(msg,"'","\'")
If goUrl="" Then
goUrl="history.go(-1);"
Else
goUrl="window.location.href='"&goUrl&"'"
End IF
Response.Write ("<script language=""JavaScript"" type=""text/javascript"">"&vbNewLine&"alert('"
& msg & "');"&goUrl&vbNewLine&"</script>")
End sub
Function GetIP()
Dim Temp
Temp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If Temp = "" or isnull(Temp) or isEmpty(Temp) Then Temp =
Request.ServerVariables("REMOTE_ADDR")
If Instr(Temp,"'")>0 Then Temp="0.0.0.0"
GetIP = Temp
End Function
nocache
for k=0 TO 100000
getTimeOver()
next
echo GetTimeOver()
echo "<br>"
echo GetIP
%>