Which is the most simple way to create code ( with PHP and SQL ) which will count the file downloads ?
I already have an integer column in the base dedicated for this feature...
( link to some example will also be welcomed )
Which is the most simple way to create code ( with PHP and SQL ) which will count the file downloads ?
I already have an integer column in the base dedicated for this feature...
( link to some example will also be welcomed )
Create an sql table with two columns:
Setup your links for downloading to go to a php script. In that script, lookup the appropriate table row based on the full path, increment it's count, then redirect the browser to the file for downloading.
You can make a download script, which is very bad for performance. My solution would be just periodical apache access log parsing.
http://tutorialzine.com/2010/02/php-mysql-download-counter/
(2nd on google search results with keywords: php mysql create download counter)