Verification of download completion

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
JustinK322
Forum Newbie
Posts: 9
Joined: Fri Jul 28, 2006 1:35 pm

Verification of download completion

Post by JustinK322 »

I have users that will be downloading files from tens of MB to a GB and I am trying to find some way to verify that the download was completed successfully. I'm just looking for some ideas because I have not been able to find anything helpful on this.
JustinK322
Forum Newbie
Posts: 9
Joined: Fri Jul 28, 2006 1:35 pm

Post by JustinK322 »

I did find this a link to http://php.net/manual/en/function.readfile.php and am going to start with that, but I am still accepting comments and ideas.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

This seems like a very difficult problem. The request for a file is separate from the request for the PHP page that provides the link. There's nothing server-side you can do to make sure the user has successfully received the whole file. There's also nothing you can do client side other than perhaps the FileSystem Javascript object : http://www.webreference.com/js/column71/2.html , though I have absolutely no idea if that's real, or just a pipe dream.

Long story short, the only practical solution is to just provide the users with a download link & let them decide for themselves if they've downloaded it successfully.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Maybe there is an Apache module for something like this.
(#10850)
Post Reply