Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

Find number of downloads?

Started by AlexN, August 07, 2006, 02:18:06 AM

Previous topic - Next topic


Is it possible to upload a file and check to see how many people have downloaded it?


Yes it most certainly is!

You will however need to do a bit of work, meaning setting up a script to track clicks/downloads to a certain link. The easiest means of this is through PHP.

Here you will find 2 good scripts for tracking the amount of times a file has been downloaded:
        - I know that the first 2/3 scripts listed have this feature enabled

Hope this helps!



Here's my idea for a basic script.  I haven't coded it yet, but now that I've thought of it, I'll probably get around to it.

1) store files in a directory named files, but make all links point to a directory named downloads instead.
1) using .htaccess mod_rewrite, redirect /downloads/filename.ext to download.php?file=filename.ext
2) mysql table with the following info: filename, #downloads
3) download.php will do the following:
---a)check if the file exists.  if no, error 404
---b)if yes, check mysql for record of that file.  if it isn't there yet, put it in with download # at 1
---c)if it was already in mysql, increment the download # by one
---d)send /files/filename.ext
meh :P