当前位置:编程学习 > asp >>

asp 用户访问统计代码{fso}

asp 用户访问统计代码{fso}

<TABLE cellSpacing=0 cellPadding=0 width=750 border=0 align=center>
  <TBODY>
  <TR>
    <TD width="100%" align=center><font color=#FFFFFF>You are the</font>
    <%whichfile=server.mappath("counter/count.txt")
      Set fs=CreateObject("Scripting.FileSystemObject")
      Set thisfile=fs.opentextfile(whichfile)
      visitors=thisfile.readline
      thisfile.close
     
        ip=Request.ServerVariables("REMOTE_ADDR")
     '比对新老IP
     if not ip=session("OldIp") then
     session("OldIp")=ip
     visitors=visitors+1
     else
     visitors=visitors
     end if
      countlen=len(visitors)
      for i=1 to countlen
      response.write "<img src=counter/3/"&mid(visitors,i,1)&".gif></img>"
      next
      set out=fs.createtextfile(whichfile)
      out.writeline(visitors)
      out.close
      set fs=nothing
    %><font color=#ffffff>Visitor</font>
   </TD>

补充:asp教程,FSO专题
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,