Page 1 of 1

check file download is completed or not

Posted: Fri Oct 10, 2008 7:45 am
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

Re: check file download is completed or not

Posted: Sun Oct 12, 2008 1:04 am
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.