%
Dim info,cnt,i,temp,rr
rr=count()
info=" "
cnt=len(rr)
for i=1 to cnt
temp=mid(rr,i,1)
info=info & ""
next
info=info & " "
function count()
dim LastVisit,chaVisit,i ,xiangge,countlen
dim foldername,oldval,newval,fs,fcount
xiangge=300
foldername=server.MapPath ("/")
if right(foldername,1)<>"\" and right(foldername,1)<>"/" then foldername=foldername & "\"
foldername=foldername & "Count.txt"
set fcount=server.createobject("scripting.filesystemobject")
on error resume next
set fs=fcount.OpenTextFile(foldername,1,True)
oldval= fs.ReadLine
set fs=Nothing
if Err.number<>0 then
oldval=100 '开始数字
end if
oldval=Clng(oldval)
newval=oldval
LastVisit = Request.Cookies("LastVisitCookie")
if LastVisit = "" then
newval=newval + 1
Response.Cookies("LastVisitCookie") = FormatDateTime(NOW)
else
chaVisit=DateDiff("s",LastVisit,Now())
if chavisit>xiangge then
newval=newval + 1
Response.Cookies("LastVisitCookie") = FormatDateTime(NOW)
end if
end if
if newval>oldval then
set fs=fcount.OpenTextFile(foldername,2,false)
fs.writeline(newval)
set fs=Nothing
end if
count=newval
CountLen=len(count)
if countlen<7 then
for i=1 to 7-countLen
count="0" & count
next
end if
set fcount=Nothing
end function
%>