Remember the ASP Classic Hit Counter? You’d create a text file for each page you wanted to record that page’s hits. To start with, you’d just type in a zero to begin the counting process. Then, you’d put this code in your ASP document:
Set fs = CreateObject("Scripting.FileSystemObject") CounterPage = Server.MapPath ("/counters/YourASPDoc.cnt") Set a = fs.OpenTextFile(CounterPage) ct = CLng(a.ReadLine) ct = ct + 1 a.Close Set a = fs.CreateTextFile(CounterPage, True) a.WriteLine (ct) a.Close Response.Write ct
Continues…
Pages: 1 2