hey guys,
I have this statement in a PHP file of mine that records downloads of a file, but the file is accessed via an ‘‘a’’ tag on the index page:
<a href="dl.php?f=file.zip">file.zip</a>
and I have 2 other files that help with the recording: dl.php, and conn.php
but, I want to send someone a direct link to a file in one of my dirs. say the file URL is site.com/dir1/file.zip
I want to send the user this link without telling them to go to page first and click a link to get the file like I illustrated above, and what I currently doing in another one of my dirs. can I throw the download transaction into a MYSQL DB by sending just a link to a file like this? there would be no query string obviously. I tried the following but I get no errors. no file is downloaded either, just a blank page renders:
<?php header('dl.php?f=file.zip'); ?>thanks guys.