check file download is completed or not

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
geethalakshmi
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2008 10:38 pm

check file download is completed or not

Post by geethalakshmi »

In my php program, when user clicks the download link file will be downloaded.
But i need to add a record to the database after download has completed.
How do i know by the php program whether download is completed.
How can i check this?
For example

When i click download link, a dialog box appears, whether to Open, Save or Cancel.

When i click 'Cancel' the database should not be updated.

Please help me to solve this.
Thanks in advance!
Geetha
Free Webmaster Resource
mikelbring
Forum Commoner
Posts: 38
Joined: Sat Jan 05, 2008 5:28 pm

Re: check file download is completed or not

Post by mikelbring »

You can't with php alone. The download it self is on apache( whatever you use)'s level so there is not a way to tell when it is done, just when the download is started.
Post Reply