欢迎光临
我们一直在努力

统计在线人数、每日访问人数和总人数-ASP教程,ASP应用

建站超值云服务器,限时71元/月

这个程序难一点,特点在于,因为他是分别的传送每个图片,所以不像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 ");"%>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 统计在线人数、每日访问人数和总人数-ASP教程,ASP应用
分享到: 更多 (0)