![]() |
[QUESTION] Download helper and remote path - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: [QUESTION] Download helper and remote path (/showthread.php?tid=67975) |
[QUESTION] Download helper and remote path - Esthar - 05-03-2017 Hi, my question is: Why if i use download helper to download a file from a remote path it don't work? Some of you have ever had this issue? Can you suggest me some workaround? Thank you so much, have a nice day. RE: [QUESTION] Download helper and remote path - Martin7483 - 05-03-2017 What do you mean by remote path? RE: [QUESTION] Download helper and remote path - Esthar - 05-03-2017 I mean download a file from a remote host, (different by the one from where the function is called) e.g: https://www.foo.com/path/to/download/file That not work and i absolutely need to download some files in this way. The site from where i intend to download files work on code igniter too. RE: [QUESTION] Download helper and remote path - Martin7483 - 05-03-2017 Well the download helper can't help you with this, because A. The data that needs to be downloaded should be passed to the function B. The data that needs to be downlaoded is already on the file system. The force_download function does not handle the downloading of remote files. You will need to create your own function that uses cURL to request the file RE: [QUESTION] Download helper and remote path - Esthar - 05-03-2017 Thank you RE: [QUESTION] Download helper and remote path - jagad89 - 05-03-2017 Code: file_get_contents this will help you RE: [QUESTION] Download helper and remote path - Martin7483 - 05-04-2017 (05-03-2017, 07:37 PM)jagad89 Wrote: Yes, but a lot of hosting providers block file_get_contents if the request is coming from a different domain. That is why i said he should use cURL |