<%
Dim objFSO , objFile
set objFSO = createobject("scripting.filesystemobject")
set objFile = objFSO.opentextfile(server.mappath("database.inc"))
'get the current count and store in counter
counter = clng(objFile.readline)
'add one to the current count
counter = counter + 1
'close file object
objFile.close
'write a new text object with the same name and new count
Set objFile = objFSO.CreateTextFile(server.mappath("database.inc"), true)
objFile.writeline(counter)
'close file object
objFile.close
'
counter_length = len(counter)
'loop through the hit count and display the image
for i = 1 to counter_length
%>
<%= mid(counter,i,1) %>
<%
next
%>