Hello, I'm hosting zip files and I want them to expire after the downloader has had a chance to finish the file. Since the file is stored in a static place what's the best way to do this? Examples? Thanks in advance.
Probably the best way to do this is setting up a php page that retrieves the file, but doesn't give it's location away. Ex: http://site.com/file.php?id=58gfsa7g98f The PHP page would check the ID for malicious code, then check the database for the ID. The mysql table would have similar to ID, file_id, file_location, file_accessed, date_accessed The php page would update in the database that file_accessed = true/1 and the date_accessed, then setup a cron job that checks the database every once 20min - 1 hour and see which files in the database need to be removed. Usually, a timeout on a file would end up to be about 2 hours, so you would remove entries that are date_accessed + 2 hours. If you need anymore info, just let me know.