5.easpcount.asp.
<%response.expires=0
id=request.querystring("id")
sername=request.servervariables("server_name")
scrname=request.servervariables("script_name")
linkurl="http://" & sername & left(scrname,(len(scrname)-9)) & "easpcount.asp?id=" &id
infile = server.mappath("counter.asp")
set fs = createobject("scripting.filesystemobject")
set thisfile = fs.opentextfile(infile,1,false)
counter = 0
do while not thisfile.atendofstream
thisline = thisfile.readline
redim preserve input(counter)
input(counter) = thisline
counter = counter + 1
loop
thisfile.close
number=(counter-1)/5
x=0
set outfile = fs.createtextfile(infile)
application.lock
outfile.writeline input(0)
for i=1 to number
outfile.writeline input((i-1)*5+1)
outfile.writeline input((i-1)*5+2)
outfile.writeline input((i-1)*5+3)
outfile.writeline input((i-1)*5+4)
if input((i-1)*5+1)=id then
x=i
outfile.writeline input((i-1)*5+5)+1
else
outfile.writeline input((i-1)*5+5)
end if
next
outfile.close
application.unlock
set fs=nothing
if x=0 then response.end
count=cstr(input((x-1)*5+5))
countlen=len(count)
for i=1 to 6-countlen
linkurl="http://"&sername&left(scrname,(len(scrname)-13))"/"&"0.gif"
%><%=linkurl%>
document.write(<img src="<%=linkurl%>">)
<%=linkurl%>
<%next
for i=1 to countlen
mdir=mid(count,i,1)
linkurl="http://"&sername&left(scrname,(len(scrname)-13))"/"&mdir&".gif"
%>
<%=linkurl%>
document.write(<img src="<%=linkurl%>">)
<% next
%>
—————————————————
writen by aspboy and powered by http://easp.126.com
用ASP实现免费计数器提供-3
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用ASP实现免费计数器提供-3
相关推荐
-      ASP 简介
-      SQL注入天书 – ASP注入漏洞全接触
-      用.net 处理xmlHttp发送异步请求
-      asp.net创建文件夹的IO类的问题
-      如何实现ASP.NET网站个性化
-      关于ASP.NET调用JavaScript的实现
-      ASP利用Google实现在线翻译功能
-      Asp无组件生成缩略图
