thedayofthecondor
IS-IT--Management
Hi, I am writing a sort of web-based file transfer application written in php.
I have a big problem: to let the user download a file I created a php script containing something like:
My problem is that while I am able to determine easily when the download starts, I have found no way to see when the download finish and if it is succesful (for example the user could cancel the download), as the file transfer is physically handled by the web server in a asyncronous way.
The question is: there is an easy way (without using CGI or similar) to execute some php code when the download ends?
Thank you in advance
I have a big problem: to let the user download a file I created a php script containing something like:
Code:
header("Content-Type: application/octet-stream");
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Length: '.$filesize);
readfile($storagelocation.$filename);
addlog(File download started: ($filename)");
The question is: there is an easy way (without using CGI or similar) to execute some php code when the download ends?
Thank you in advance