Skip to content
Advertisement

Pause-able download for Apache

I have an Apache server running which hosts a php web application. This server also provides provisions for downloading a file size of around 900MB from it. However, while testing the application I found out that it’s not possible to pause the downloads and resume them later on.

Could someone help me? Is it an apache property I must change?

Advertisement

Answer

If you serve your files with php then you should implement Range header processing in your script. You can recieve current range value from $_SERVER['HTTP_RANGE']. It contains the offset in bytes from begin of file.

ps: as usually mentioned – almost everything is already answered here 😉 Resumable downloads when using PHP to send the file?

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement