ASPired2Count is a page hit counter that uses a database to store the times the pages are visited. The hit counter can be displayed as either text or graphics.

There are 2 lines of code you should insert into each file that you want to display a counter. At the top of the file, include this line of code.
<!-- #INCLUDE FILE="ASPired2Count.inc" -->
You may need to change the path to the file "ASPired2Count.inc" based on your file hieracrhy. Where you want to add the hit counter, insert a line of code for either the text counter or graphical counter.
<%=Get_Hit_Count(Request.ServerVariables("URL"), true)%> ' Text counter
<%=Hits2Image(Get_Hit_Count(Request.ServerVariables("URL"), false), 5)%> ' Graphical counter
To set up the database, do the following steps.
- Place the database file "ASPired2Count.mdb" into a folder with write permissions.
- Change the line 4 of ASPired2Count.inc ( pathStr = ".\ASPired2Count.mdb" ) to point to where your database is located.
- You may need to change the folder location for the numerical images. This is on line 64 of ASPired2Count.inc.
- If you know what you are doing and prefer a DSN connection, change the connection string on line 10 to the DSN name.
Changing the Graphic Images
In the ASPired2Count package, a folder is included that contains 10 GIFs for displaying a graphical hit counter. You can add your own numbers to this folder. We encourage you to make the numbers your own style. Once you have created a set of numerical graphics, you may need to change the links to the files.
- Open the file "ASPired2Count.inc"
- Change the file names on lines 53-62.
- If you changed the folder, change the folder location on line 64.
|