Forum Moderators: coopster

Message Too Old, No Replies

Is it possible to know when a download is finished?

Is it possible to know when a download is finished?

         

PetterSmart

9:26 pm on Jun 7, 2006 (gmt 0)



Is it possible to use a php script to let a user download a file (.doc .mpeg or whatever), to detect when the download is finished and then run the rest of the script?

dreamcatcher

6:51 am on Jun 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi PetterSmart, welcome to Webmaster World. :)

This function may help. fpassthru() [uk.php.net]

Check some of the user contributed notes.

dc

coopster

1:03 pm on Jun 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Why not just send the correct header [php.net] to the browser first and use readfile [php.net] to fire the output directly to the browser? At the end of the readfile you know they are finished.