Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP file transfer application - need to know if downloads ar succesful

Status
Not open for further replies.

thedayofthecondor

IS-IT--Management
Jan 28, 2005
1
GB
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:
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)");
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top