Text Counter
Now create a folder called counters or you can call it something else if you want just remember and change the code above . Now create a text file called counter1.txt and enter whatever you wish to start the count at.
<%@ Language=VBScript %>
<%
Dim fso
Set fso = Server.CreateObject(”Scripting.FileSystemObject”)
//this is the path to your counter1.txt file
counter = Server.MapPath(”/counters”) & “\counter1.txt”
//open the text file
Set InStream = fso.OpenTextFile(counter , 1, False)
oldCount = Trim(InStream.ReadLine)
//increment the oldcount by 1 and store in newcount
newCount = oldCount + 1
Set OutStream = fso.CreateTextFile(counter, True)
//copy newcount to the text file
OutStream.WriteLine(newCount)
%>
Now you would place the folllowing where you want the counter to appear on your site
<%= newCount%>


















































