Download file with counter using Php Header


This is a simple php program about how to download a file (mp3, word, excel,mp4 and etc...) from the server or your storage and at the same time, it has a counter that counts how many downloads has been done. have a great time learning with php! the code is very simple and understandable! : - ) HAVE FUN!!!

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.


Submitted byAnonymous (not verified)on Thu, 11/12/2009 - 13:58

sir, good afternoon, sir may i ask you that how can we start our project...
Submitted byAnonymous (not verified)on Sun, 03/17/2013 - 14:50

what if the file is in another folder? for example the folder structure is download.php index.html >documentsfolder sample.doc

Add new comment