<% ' ASP counter by Per Thulin 2008-10-10. This version displays the counter.
counterfile = "counter.txt" ' Ändra gärna filnamn
On Error Resume Next
Set FS=Server.CreateObject("Scripting.FileSystemObject")
Set RS=FS.OpenTextFile(Server.MapPath(counterfile), 1, False) ' mode=ForReading, create=False
fcount=RS.ReadLine : fcount=fcount+1 : RS.Close : Err.Clear
Set RS=FS.OpenTextFile(Server.MapPath(counterfile), 2, True) ' mode=ForWriting, create=True
If Err then Response.Write(" counter error: " & Err.Description) : Err.Clear
RS.Write fcount : RS.Close : Set RS=Nothing : Set FS=Nothing
Response.Write(fcount)
%> besökare sedan 2008-10-19 2008-11-09