Applications related to this subject are numerous, for example, you can make a counter: it each time the page is read the value in the text file, and rewrites it increased by one. Or you can create a file for the statistics, in which to store the date and time you access a page. We start with make a counter:
Code:
<SCRIPT Language=vbscript>
<! -
Set fso = CreateObject ("Scripting.FileSystemObject")
counter = "c: counter.txt"
if not fso.FileExists (counter) then
fso.CreateTextFile (counter)
December OggFile fso.GetFile = (counter)
December OggTextStream OggFile.OpenAsTextStream = (2)
OggTextStream.WriteLine "0"
OggTextStream.Close
end if
December OggFile fso.GetFile = (counter)
December OggTextStream1 OggFile.OpenAsTextStream = (1)
value = OggTextStream1.ReadLine
OggTextStream1.Close
December OggTextStream OggFile.OpenAsTextStream = (2)
OggTextStream.WriteLine cstr (cint (value) +1)
OggTextStream.Close
//-->
</ SCRIPT>
The script is composed of a first part which deals with whether there is a text file, if does not exist, create it and insert into a value of 0.
Bookmarks