Page 1 of 1

Stopped Downloads of big files

Posted: Mon Mar 31, 2003 3:15 am
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...

Posted: Mon Mar 31, 2003 4:55 am
by volka
take a look at http://www.php.net/manual/en/function.c ... borted.php and the linked pages.

Posted: Mon Mar 31, 2003 5:03 am
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