I have a php file which generate a file to be downloaded using POST parameters. I already have everything working to resume file downloading (using Range header and everything related).
However, if I pause the download and then try to resume it, the browser does not send POST data in the request. This works fine using GET data instead but I'd like to keep using POST. How could I make this work ?
Notes:
- The file is generated on the fly and sent to the browser (simply print'ed by php) using the right headers.
- I cannot save the file somewhere and serve it. It has to be served on the fly.
*sorry for my bad english.
well, lets say that you have database to save the POST params.
then you need to create unique url for the download based on the params.
lets say that the download link is
dowload.php<- you send the POST here.now you need to save the params there, and lets says that you get the
unique_id.after that you redirect the page to the new page(with the unique_id param) that process the download, for example
resume_download.phpexample download url will be
resume_download.php?req=[your_unique_id]or you can use.htaccessto made the url more friendlythis is not guarantee the download will continue, but at least user don't need to re-enter the form.