Stopped Downloads of big files

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
Gahmuret
Forum Newbie
Posts: 2
Joined: Mon Mar 31, 2003 3:15 am

Stopped Downloads of big files

Post by Gahmuret »

Hi everybody, you're my last hope...

I use the readfile-function for downloading files. Everything works fine (Headers etc). But: I don't get the information, if the file was downloaded completly or even if the download started... the readfile-function always returns the number of bytes of the complete file. In IE you are able to cancel the download even before it started and still readfile return the full size of the file.

Any suggestions how to avoid that??? I really need to know how many bytes have been sent to the client/browser. At least I need to know, if all of the file was sent or not.

Thanks for any help...
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

take a look at http://www.php.net/manual/en/function.c ... borted.php and the linked pages.
Gahmuret
Forum Newbie
Posts: 2
Joined: Mon Mar 31, 2003 3:15 am

Post by Gahmuret »

Sorry, didn't post - found the solution by myself. Had to do with buffering the output. Stopping buffering before sending does it. But I'll have a look at connection_abort (status), too.

Jörn
Post Reply