View Full Version : Download Counter
tensionm
05-01-2003, 05:03 PM
I put some downloads on my site and a want to put a counter on there, to show how many times the thing has been downloaded. Both for my information and the visitor.
I have seen some round before, anyone have the coding though?
antoshka
07-19-2003, 11:53 AM
this message was posted in May, so i figured the author has found the answer by now. just in case, here's a way to solve it.
1. you need a database to store information about downloads. you can use a file, but that's not as efficient and pretty.
2. make a script that will count a hit and then redirect user to the file. you will call the script as http://www.yoursite.com/counter.php?file=somefile.zip
it will increase the counter by 1, store the value in database, and redirect the user to the file. to do the redirect use header() function. like this:
header("Location: " . $filename);
that's it! the user will start downloading file automatically after the counter is increased.
this is a general solution, but a specific one requires too many detailed explanations, etc. im just too lazy to do it right now :)
if anyone really needs it though - let me know and I will post it here.
starter
10-27-2003, 11:07 PM
this one will work for you www.downloadcounter.com/
vBulletin® v3.6.8, Copyright ©2000-2010, Jelsoft Enterprises Ltd.