Hello everyone,
I have a file download script but I want to track how many times each file has been downloaded. I have a MySQL database — how do I increment a counter each time a user downloads a file?
<?php $file = "files/myfile.zip"; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=myfile.zip"); readfile($file); ?>
Thanks in advance!