虹雨的功能较全的计数程序

这个程序难一点,特点在于,因为他是分别的传送每个图片,所以不像CGI产生的图片那样大。而且图片可以重复的利用所以较率高速度快。只是没有JavaScript就不行了。
程序原代码:

 1   
 2imgurl="http://xxx.xxx.xxx/xxxx/" '图片路径   
 3imgname="xxx" '图片名字   
 4cnt=0   
 5dnt=0   
 6s=Request.ServerVariables("path_translated")   
 7cName = left(s,instrrev(s,"\",len(s)))&"chy.cnt"   
 8dName = left(s,instrrev(s,"\",len(s)))&"dchy.cnt"   
 9Set objFSO = Server.CreateObject("Scripting.FileSystemObject")   
10Set objCountFile = objFSO.OpenTextFile(cName,1,True)   
11If Not objCountFile.AtEndOfStream Then cnt=CLng(objCountFile.ReadAll)   
12objCountFile.Close   
13Set objCountFile=Nothing   
14cnt=cnt+1   
15Set objCountFile=objFSO.CreateTextFile(cName,True)   
16objCountFile.Write cnt   
17objCountFile.Close   
18Set objCountFile=Nothing   
19  
20if application("dntime")<=cint(hour(time())) then   
21Set objCountFile = objFSO.OpenTextFile(dName,1,True)   
22If Not objCountFile.AtEndOfStream Then dnt=CLng(objCountFile.ReadAll)   
23objCountFile.Close   
24Set objCountFile=Nothing   
25end if   
26application("dntime")=cint(hour(time()))   
27dnt=dnt+1   
28Set objCountFile=objFSO.CreateTextFile(dName,True)   
29objCountFile.Write dnt   
30objCountFile.Close   
31Set objCountFile=Nothing   
32Set objFSO = Nothing   
33Response.Write "document.write('99?7?10???"   
34for i=1 to len(cnt)   
35Response.Write "

<img .gif="" src="imgurl&amp;imgname&amp;Mid(cnt,i,1)&amp;"/>

1"   
2next   
3Response.Write "   
4?????"   
5for i=1 to 4-len(dnt)   
6Response.Write "

<img 0.gif="" src="&amp;imgurl&amp;"/>

1"   
2next   
3for i=1 to len(dnt)   
4Response.Write "

<img .gif="" src="imgurl&amp;imgname&amp;Mid(dnt,i,1)&amp;"/>

 1"   
 2next   
 3t=(cint(day(date()))*24+cint(hour(time())))*60+cint(minute(time()))   
 4k=0   
 5i=1   
 6y=0   
 7Do While application("zxip"&i)<>""   
 8if application("zxip"&i)=Request.ServerVariables("REMOTE_ADDR") then   
 9application("zxsj"&i)=t   
10y=1   
11end if   
12if t-application("zxsj"&i)>9 or t

<application("zxsj"&i) else="" if="" k="" then="">0 then
application.lock
application("zxip"&amp;i-k)=application("zxip"&amp;i)
application("zxsj"&amp;i-k)=application("zxsj"&amp;i)
application.unlock
end if
end if
if k&gt;0 then
application.lock
application("zxip"&amp;i)=""
application.unlock
end if
i=i+1
loop
if y=0 then
application("zxip"&amp;i)=Request.ServerVariables("REMOTE_ADDR")
application("zxsj"&amp;i)=t
else
i=i-1
end if
Response.Write " ?????"
if len(i)=1 then Response.Write "<img 0.gif="" src="&amp;imgurl&amp;"/>"
for j=1 to len(i)
Response.Write "<img .gif="" src="imgurl&amp;imgname&amp;Mid(i,j,1)&amp;"/>"
next
Response.Write "');"

Published At
Categories with Web编程
Tagged with
comments powered by Disqus