如何让计数器只对新进用户计数?

如何让计数器只对新进用户计数?

<script language=vbscript runat=server>

sub application_onstart

filepath=server.mappath("/count")

filename=filepath+"\counter.txt"

set fs=createobject("scripting.filesystemobject")

if not fs.fileexists(filename) then

  fs.createtextfile(filename)

    set f=fs.getfile(filename)

           s=1

Set ts = f.OpenAsTextStream(2, -2)

ts.writeline(cstr(s))

ts.close

          else

    set f=fs.getfile(filename)

    Set ts = f.OpenAsTextStream(1, -2)

    s=ts.readline+1

    ts.close

end if

application(“visitor”)=s

end sub

 

sub session_onstart

session.timeout=5

application("visitor ")=application("visitor ")+1

set f=fs.getfile(filename)

     Set ts = f.OpenAsTextStream(2, -2)

 

ts.writeline (cstr(application("visitor ")))

ts.close

end sub

</script>

<%

s=cstr(application("visitor")+10^6)

s=mid(s,2,6)

for i=1 to 6

   response.write "<img src='flashdays/liyanbing/images/"

&mid(s,i,1)&".gif' width='18' height='25'>"

next

%>

[1]

本文章来源于网络,作者是:,由代码部落进行采编,如涉及侵权请联系删除!转载请注明出处:https://daimabuluo.cc/biancheng10000wen/1089.html

联系我们

在线咨询:点击这里给我发消息

邮件:dick@daimabuluo.cc

遇到问题?请给我们留言

请填写您的邮箱地址,我们将回复您的电子邮件