ClearDownloadsCounter
Please add a link to lirae.co.uk to your credits page if you use this script.
Introduction
A simple to install and use downloads counter. You can sort your downloadables into categories (example: brushes, scripts, smilies, etc), show the stats to your visitors and show the amount of downloads a particular item has gotten.
It's also helpful if you just wish to mask your download links. :)
Download
Download ClearDownloadsCounter?{13.2KB} [downloaded 260 times].
View the example stats page?
Features
- Organise Downloads - set each downloadable into a category.
- Organised Stats - view statistics by downloads, ID or category.
- Show Individual Number Of Downloads - show the amount of downloads a particular item has gotten.
- Stats Are Optional - if don't want your visitors to know the stats, just delete stats.php!
Installing
Step 1
Download the script and unzip the files anywhere on your computer...if you haven't already done so.
Step 2
Open up config.php and edit the variables to fit your information.
Don't know how to create a MySQL database?
Step 3
Upload all files to your server.
Step 4
Load up install.php in your browser, by going to http://yoursite.com/ClearDownloadsCounter/install.php, changing the domain to whatever your site's URL is. ;)
If the install was successful, you will get a message saying that the table has been installed. It will tell you to delete install.php - do it; you won't be able to get any further otherwise. Leaving install.php on the server could be a problem, so it's best to remove it.
Step 5
Log into the admin panel by going to http://yoursite.com/ClearDownloadsCounter/admin/ and entering the username and password you edited in the config.php file.
Add a category and then you can start adding download items! {The URLs must not contain ampersands (&).}
Optional Stuff
Stats.php
If you don't want your visitors to see your download statistics, you're more than welcome to delete this file.
If you do want your visitors to see your download statistics, make a regular *.php page and include stats.php:
<?php include("/home/user/public_html/ClearDownloadsCounter/stats.php");?>
Be sure to change "/home/user/public_html/ClearDownloadsCounter/stats.php" to the server path to where your stats.php sits.
Showing Individual Download Stats
If you want to show the number of downloads an item has gotten (like I have done with my scripts), first you'll need to include config.php onto the page:
<?php include("/home/user/public_html/ClearDownloadsCounter/config.php");?>
(Be sure to change "/home/user/public_html/ClearDownloadsCounter/config.php" to the server path to where your config.php sits!)
Then add:
<?php show_hits([idnumber]);?>
wherever you'd like the number of downloads to show.
([idnumber] should be changed to the ID of the file. If the ID is 6, then the code should be:)
<?php show_hits(6);?>
Updates Log
- Aug/08 - added: list view for easier management and when you add a download, it automatically tells you the download URL. :)
- Nov/06 - released.




