A few weeks ago I released my PHP and MySQL link/download tracker. Today I release a complete rewrite. Announcing SHTracker!
To see a working example, simply download from the site as it powers the downloads system.
See here for more information
A few weeks ago I released my PHP and MySQL link/download tracker. Today I release a complete rewrite. Announcing SHTracker!
To see a working example, simply download from the site as it powers the downloads system.
See here for more information
Recently I decided, to redesign the site’s downloads system. Originally I was using the excellent PHP Click Counter from PHPJunkyard to count downloads. However the script was far from perfect and presented problems each time I released a new download. For the revamp I decided I wanted to use MySQL databases to store the data. Unfortunately I could not find a script which would do exactly what I required. So I made my own.
Three hours later the PHP and MySQL Link/Download Tracker was born.
What it does: The script will count link clicks and store its results in a database.
Setup:
CREATE TABLE `Data` ( `id` VARCHAR( 50 ) NOT NULL , `count` INT( 10 ) NOT NULL default '0' , PRIMARY KEY ( `id` ) ) ENGINE = MYISAM ;
$links = array( "mydownload1" => "http://some.site/mydownload1.zip", "mydownload2" => "http://some.site/mydownload2.zip" );
So if your download was called mytest, you would change mydownload1 to mytest and set the url to the download url of the file. You can add as many id’s as you wish.
Usage:
The script is called like this: /get.php?id=mydownload1
So instead of linking to /mydownload1.zip, link to /get.php?id=mydownload1
To show your download stats simply call show.php rather than get.php
Download
Source
Update: See here.