I use a free hit counter done in asp/vbscript written by FELIXONE 2002 - SB by Felice Di Stefano -
www.felixone.it - I've been using it for over a year; but all of a sudden without me changing anything I received the following error:
Microsoft VBScript runtime error '800a003e' Input past end of file
I have posted the code below. I am not a "coder" and only know a little bit about ASP. I don't want to take the counter off the site if I don't have to - so if someone can tell me the fix I would really appreciate it. Since my site shows this error - the sooner fixed the better.
Thanks in advance.
<%
' *** Visit Counter ***
' FELIXONE 2002 - SB by Felice Di Stefano -
www.felixone.itDim FX_count
Dim FX_digit
FX_digit = 5
Dim FX_dpath
FX_dpath = Server.MapPath("FX_DataCou
nter")
Dim FX_fpath
FX_fpath = Server.MapPath("FX_DataCou
nter/count
er.txt")
set FX_fso = Server.CreateObject("Scrip
ting.FileS
ystemObjec
t")
' Check if directory and file exists, if not create it.
If (Not FX_fso.fileExists(FX_fpath
)) Then
If (Not FX_fso.folderExists(FX_dpa
th)) Then
FX_fso.CreateFolder(FX_dpa
th)
End If
Application.Lock()
set FX_file = FX_fso.OpenTextFile(FX_fpa
th, 8, true)
FX_file.write(0)
FX_file.Close()
Application.Unlock()
End If
' Read file and update it once per session
set FX_fobj = FX_fso.getfile(FX_fpath)
set FX_file = FX_fobj.OpenAsTextStream(1
,-2)
FX_count = FX_file.Read(100)
If (Session("FX_DataCounter")
= "") Then
Application.Lock()
set FX_file = FX_fso.CreateTextFile(FX_f
path, 8, false)
FX_file.write(FX_count+1)
FX_file.Close()
Application.Unlock()
set FX_fso = nothing
FX_count = FX_count+1
Session("FX_DataCounter") = FX_count
End If
' Add leadings
FX_numlength = Len(cStr(FX_count))
If (FX_numlength < FX_digit) Then
FX_lead = cInt(FX_digit - FX_numlength)
For i=1 To FX_lead
FX_count = "0" & FX_count
Next
End If
Session("lastPage")=Reques
t.ServerVa
riables("S
cript_Name
") & "?" & Request.QueryString()%>
<%=FX_count%>
Start Free Trial