BalthaZar
Karma: 0
|
Re:Download resume support - 2006/08/06 21:24
You have to handle the http request header sent by the client. There will be a line like this: Range: bytes=339843-2392437 That means that the client requests the bytes between 339843 and 2392437
So after your fopen(), you should send those bytes to the client. I guess you will need to use fseek and then fread.
Your response header should start with HTTP/1.1 206 Partial Content and should have these 3 lines: Accept-Ranges: bytes Content-Length: 2052595 Content-Range: bytes 339843-2392437/2392438
You can find more info at these pages: Header Field Definitions: http://freesoft.org/CIE/RFC/2068/197.htm php examples and explanations: http://php.net/header An very nice httpdownload class that supports resume: http://www.phpclasses.org/browse/package/2221.html
|