There is anumber of ways to track usage of a website. The easiest way is a hit counter. The follwoing code gives the simplest hit counters. A text document (count.txt) is placed in the same directory (providing that directory has write access) as the page we want the counter to appear on.
<%
on error resume next
set fs = createobject("scripting.filesystemobject")
set ac = fs.opentextfile(server.mappath("count.txt"))
counter = clng(ac.readline)
counter = counter + 1
ac.close
Set ac = fs.CreateTextFile(server.mappath("count.txt"), true)
ac.WriteLine(counter)
ac.Close
Response.Write counter
%>
Wednesday, May 30, 2007
Want to track usage of a website...
Posted by Ashutosh Dixit at 8:57 AM
Subscribe to:
Post Comments (Atom)

0 Comments:
Post a Comment