realjumper Posted March 2, 2006 Share Posted March 2, 2006 Hi,My little application is a simple file upload system. There is only ever going to be one user who will upload, and one user who will download the file. There is also an archive of current uploaded files for the download person, and a separate archive page for the uploader which is the same, but includes a delete function to delete the db record and also to delete the actual file. When a file is uploaded, an email is sent to the person who will download the file when he is ready, by visiting the archive page and choosing which file he wishes to dowload and clicking the 'download' link. So far so good.What I want to do now is to have a 'Yes'/'No' next to the archive of each file which will let the user know whether the file has been downloaded or not. The question is.....how do I detect if the file has been downloaded or not?Thanks for any suggestions.Neil Quote Link to comment https://forums.phpfreaks.com/topic/3956-how-to-detect-file-download/ Share on other sites More sharing options...
wickning1 Posted March 3, 2006 Share Posted March 3, 2006 You can set up a PHP script to feed the browser a download instead of a web page. You just need to set the content-type correctly with the header() function. This script can also record the fact that it was run.See this page from the PHP documentation for more information:[a href=\"http://us3.php.net/manual/en/function.header.php\" target=\"_blank\"]http://us3.php.net/manual/en/function.header.php[/a] Quote Link to comment https://forums.phpfreaks.com/topic/3956-how-to-detect-file-download/#findComment-13775 Share on other sites More sharing options...
realjumper Posted March 4, 2006 Author Share Posted March 4, 2006 Thanks for that wickning1.....I haven't quite got it sorted yet, but I'm close!! Hopefully I'll have this running very soon.Cheers,Neil Quote Link to comment https://forums.phpfreaks.com/topic/3956-how-to-detect-file-download/#findComment-14092 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.