Has File Been Downloaded

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

Has File Been Downloaded

Post by RCA86 »

Hey guys,

Does anybody know if it's possible, using PHP, to tell if a file in a directory has been accessed? I'm exporting a CSV file for download, and would like to be able to check if it's been downloaded, so I can delete it (using a cron job).

Cheers
User avatar
awebtech
Forum Newbie
Posts: 21
Joined: Sun Nov 07, 2010 4:54 pm
Location: Russian Federation

Re: Has File Been Downloaded

Post by awebtech »

Hello, RCA86, you can provide file for download not directly, but via PHP script. As soon as last part of the file is transferred, this script will delete the file.

For example: http://www.finalwebsites.com/forums/top ... e-download
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

Re: Has File Been Downloaded

Post by RCA86 »

That'll do nicely. Cheers for the help!
Post Reply