Determine if file was downloaded successfully.

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
User avatar
jlising
Forum Commoner
Posts: 33
Joined: Mon Mar 19, 2007 1:48 am
Location: Pampanga, Philippines
Contact:

Determine if file was downloaded successfully.

Post by jlising »

Hi!

I have a script which allows users to download my files. An email will be sent every download attempts. My problem is, how can I determine if the user successfully downloads a file and not clicked the close or cancel button in the download window? I want to track it so that the script will send an email after the user successfully downloaded a file.

Many thanks!
Jessie
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You will need a script to send the file in small chunks, then do whatever action after it finishes sending all the chunks.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

what about sending the header, followed by a readfile(), then logging the confirmation after? Does it still get past the readfile() on a user abort?
Post Reply