Reply to Re: How to allow downloaded files to be splitted when using a force-download script ?

Your name:

Reply:


Posted by the DtTvB on 05/28/06 13:54

For apache servers, use
implode('::', apache_request_headers());
It will get each request headers from apache.

Download managers will send this request:
Range: bytes=xxxxx-yyyyy
Where xxxxx is the start position, and yyyyy is the end position.

Some download managers will send this request:
Range: bytes=xxxxx-
This means start position is xxxxx and so on.

If it has no matches, send it all.

If the match was found, send this header.
header('HTTP/1.1 206 Partial content');
else send this.
header('HTTP/1.1 200 OK');

Use substr to split the file content and send
header('Content-Length: ' . strlen($content));
// The substred content.

Hope this helps.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация