虹雨的功能較全的計數程式

來源:互聯網
上載者:User
這個程式難一點,特點在於,因為他是分別的傳送每個圖片,所以不像CGI產生的圖片那樣大。而且圖片可以重複的利用所以較率高速度快。只是沒有JavaScript就不行了。
程式原代碼:


<%
imgurl="http://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="imgurl&imgname&Mid(cnt,i,1)&".gif>"
next
Response.Write "
?????"
for i=1 to 4-len(dnt)
Response.Write "<img src="&imgurl&"0.gif>"
next
for i=1 to len(dnt)
Response.Write "<img src="imgurl&imgname&Mid(dnt,i,1)&".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="&imgurl&"0.gif>"
for j=1 to len(i)
Response.Write "<img src="imgurl&imgname&Mid(i,j,1)&".gif>"
next
Response.Write "');"%>


相關文章

Beyond APAC's No.1 Cloud

19.6% IaaS Market Share in Asia Pacific - Gartner IT Service report, 2018

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。