Jump to content

[SOLVED] File Creation and Temp Download Time


Asheeown

Recommended Posts

I am creating a program that is going to make a file populated with at least 20 MB of data and many people are going to be using it.

 

I want the user to be able to download this file for at least 10 minutes and then it to be deleted.

 

Does this have to be done via cronjob or can php write a rule to delete that file after 10 minutes?

Because if this was done by cronjob it would have to be set basically to run every minute to get it right on the dot like most website do.

have a database with a table + timestamp, when the timestamp+10minutes expires you can refuse the downloads.. you can then have a cleanup script / cronjob to delete expired files every hour/day/week whatever

 

EDIT: you could replace the database table with a flatfile

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.