Web Wiz Guide Database Hit Counter realease v1.5 The Web Wiz Guide Database Hit Counter v1.5 is written by Bruce Corkhill **************************************************************************************** ** Copyright Notice ** ** Web Wiz Guide - Database Hit Counter v1.5 ** ** Copyright 2001-2002 Bruce Corkhill All Rights Reserved. ** ** This program is free software; you can modify (at your own risk) any part of it ** under the terms of the License that accompanies this software and use it both ** privately and commercially. ** ** All copyright notices must remain in tacked in the scripts and the ** outputted HTML. ** ** You may use parts of this program in your own private work, but you may NOT ** redistribute, repackage, or sell the whole or any part of this program even ** if it is modified or reverse engineered in whole or in part without express ** permission from the author. ** ** You may not pass the whole or any part of this application off as your own work. ** ** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place ** and must remain visible when the pages are viewed unless permission is first granted ** by the copyright holder. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER ** WARRANTIES WHETHER EXPRESSED OR IMPLIED. ** ** You should have received a copy of the License along with this program; ** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. ** ** ** ** No official support is available for this program but you may post support questions at: - ** http://www.webwizguide.info/forum ** ** Support questions are NOT answered by e-mail ever! ** ** For correspondence or non support questions contact: - ** info@webwizguide.com ** ** or at: - ** ** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom ** **************************************************************************************** The copyright notice has been placed here as I have found people passing my scripts of as there own and I have even come across someone selling them!! If you are having problems running the script then please post a message about the problem to the Web Wiz Guide forum at: - http://www.webwizguide.info/forum your questions will be answered there NOT be e-mail The Database Hit Counter uses ASP and must be run through a web sever supporting ASP. Luckily Windows 98 comes with Personal Web Sever found on the windows 98 CD. Windows 2000 is even better as it comes with Microsoft's Web Sever, IIS 5. Windows NT 4 and 95 users can get a copy of Personal Web Sever by downloading NT 4 Option Pack from Microsoft. Don't be fooled by the name as it asks if you wish to download Windows 95 version. A Text Editing program like UltraEdit is also highly recommended for editing any ASP scripts and an FTP program like Bullet FTP for uploading any scripts to your ASP enabled web space. Using the database hit counter Unzip all the files to the same directory. Files must be run through an ASP enabled web sever (not the same as CGI). No data needs to be placed in the Access 2000 hit_count database as every page the asp hit counter is placed on an entry will automactically be written to the database. The hit counter can be used on multiple pages by placing the following line at the top of each asp page requiring a hit counter: - <% 'Dimenstion Variables Dim strDatabasePath 'Initialise the path to the access database if inside another folder strDatabasePath = ("") 'Call the sub procedure to increment the hit counters Call IncrementHitCount(strDatabasePath) %> The following line must also be put in the HTML of the page not between <% %>, if the hit_count.inc file is in another dirctory to the page you must include the path to the file: - The hit counters are hidden so to view the hit counters use the admin page supplied. The admin page shows a total hit counter and another that can be reset for each page the hit counter is on. Dates the hit counters are from are also displayed on the hit counters admin page. If the web page that the hit couter is on is not in the same folder then make sure the strDatabasePath variable holds the correct path to the database, but not the database name. Also make sure that the path to the hit_count.inc is changed to the correct path (keep the hit_count database and include file in the root directory of your website). If you recieve the following error: - Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. This means that the directory the database is in does not have the right permissions to be able to write to the database. If you are running the web server yourself and using the NTFS file system then there is an FAQ page at, http://www.webwizguide.info/asp/FAQ, on how to change the server permissions on Win2k/NT4. If you are not running the server yourself then you will need to contact the server's adminstrator and ask them to change the permissions otherwise you cannot update a database. If you are having trouble with the script then please take a look at my FAQ's, before e-mailing me, at: - http://www.webwizguide.info/asp/FAQ