虹雨的功能较全的计数程序
程序员文章站
2022-12-05 10:22:44
这个程序难一点,特点在于,因为他是分别的传送每个图片,所以不像cgi产生的图片那样大。而且图片可以重复的利用所以较率高速度快。只是没有javascript就不行了。程序原代码:&l...
这个程序难一点,特点在于,因为他是分别的传送每个图片,所以不像cgi产生的图片那样大。而且图片可以重复的利用所以较率高速度快。只是没有javascript就不行了。
程序原代码:
<%
imgurl="https://xxx.xxx.xxx/xxxx/" 图片路径
imgname="xxx" 图片名字
cnt=0
dnt=0
s=request.servervariables("path_translated")
cname = left(s,instrrev(s,"",len(s)))&"chy.cnt"
dname = left(s,instrrev(s,"",len(s)))&"dchy.cnt"
set objfso = server.createobject("scripting.filesystemobject")
set objcountfile = objfso.opentextfile(cname,1,true)
if not objcountfile.atendofstream then cnt=clng(objcountfile.readall)
objcountfile.close
set objcountfile=nothing
cnt=cnt+1
set objcountfile=objfso.createtextfile(cname,true)
objcountfile.write cnt
objcountfile.close
set objcountfile=nothing
if application("dntime")<=cint(hour(time())) then
set objcountfile = objfso.opentextfile(dname,1,true)
if not objcountfile.atendofstream then dnt=clng(objcountfile.readall)
objcountfile.close
set objcountfile=nothing
end if
application("dntime")=cint(hour(time()))
dnt=dnt+1
set objcountfile=objfso.createtextfile(dname,true)
objcountfile.write dnt
objcountfile.close
set objcountfile=nothing
set objfso = nothing
response.write "document.write(99?7?10???"
for i=1 to len(cnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936502.gif">"
next
response.write "
?????"
for i=1 to 4-len(dnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936252.gif">"
next
for i=1 to len(dnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936614.gif">"
next
t=(cint(day(date()))*24+cint(hour(time())))*60+cint(minute(time()))
k=0
i=1
y=0
do while application("zxip"&i)<>""
if application("zxip"&i)=request.servervariables("remote_addr") then
application("zxsj"&i)=t
y=1
end if
if t-application("zxsj"&i)>9 or t<application("zxsj"&i) then
k=k+1
else
if k>0 then
application.lock
application("zxip"&i-k)=application("zxip"&i)
application("zxsj"&i-k)=application("zxsj"&i)
application.unlock
end if
end if
if k>0 then
application.lock
application("zxip"&i)=""
application.unlock
end if
i=i+1
loop
if y=0 then
application("zxip"&i)=request.servervariables("remote_addr")
application("zxsj"&i)=t
else
i=i-1
end if
response.write " ?????"
if len(i)=1 then response.write "<img src="/edu/uploadpic/2007-12/2007129132936252.gif">"
for j=1 to len(i)
response.write "<img src="/edu/uploadpic/2007-12/2007129132940232.gif">"
next
response.write ");"%>
程序原代码:
<%
imgurl="https://xxx.xxx.xxx/xxxx/" 图片路径
imgname="xxx" 图片名字
cnt=0
dnt=0
s=request.servervariables("path_translated")
cname = left(s,instrrev(s,"",len(s)))&"chy.cnt"
dname = left(s,instrrev(s,"",len(s)))&"dchy.cnt"
set objfso = server.createobject("scripting.filesystemobject")
set objcountfile = objfso.opentextfile(cname,1,true)
if not objcountfile.atendofstream then cnt=clng(objcountfile.readall)
objcountfile.close
set objcountfile=nothing
cnt=cnt+1
set objcountfile=objfso.createtextfile(cname,true)
objcountfile.write cnt
objcountfile.close
set objcountfile=nothing
if application("dntime")<=cint(hour(time())) then
set objcountfile = objfso.opentextfile(dname,1,true)
if not objcountfile.atendofstream then dnt=clng(objcountfile.readall)
objcountfile.close
set objcountfile=nothing
end if
application("dntime")=cint(hour(time()))
dnt=dnt+1
set objcountfile=objfso.createtextfile(dname,true)
objcountfile.write dnt
objcountfile.close
set objcountfile=nothing
set objfso = nothing
response.write "document.write(99?7?10???"
for i=1 to len(cnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936502.gif">"
next
response.write "
?????"
for i=1 to 4-len(dnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936252.gif">"
next
for i=1 to len(dnt)
response.write "<img src="/edu/uploadpic/2007-12/2007129132936614.gif">"
next
t=(cint(day(date()))*24+cint(hour(time())))*60+cint(minute(time()))
k=0
i=1
y=0
do while application("zxip"&i)<>""
if application("zxip"&i)=request.servervariables("remote_addr") then
application("zxsj"&i)=t
y=1
end if
if t-application("zxsj"&i)>9 or t<application("zxsj"&i) then
k=k+1
else
if k>0 then
application.lock
application("zxip"&i-k)=application("zxip"&i)
application("zxsj"&i-k)=application("zxsj"&i)
application.unlock
end if
end if
if k>0 then
application.lock
application("zxip"&i)=""
application.unlock
end if
i=i+1
loop
if y=0 then
application("zxip"&i)=request.servervariables("remote_addr")
application("zxsj"&i)=t
else
i=i-1
end if
response.write " ?????"
if len(i)=1 then response.write "<img src="/edu/uploadpic/2007-12/2007129132936252.gif">"
for j=1 to len(i)
response.write "<img src="/edu/uploadpic/2007-12/2007129132940232.gif">"
next
response.write ");"%>
推荐阅读