Page 1 of 1

Download Remote File via HTTP

Posted: Tue Aug 14, 2012 5:55 pm
by matt@b10
Hi, I have been going around in circles with this idea. I found the the FAQ on downloading remote files, but it requires authentication (which my host does not provide for the area containing my downloadable content).

I am able to download local files via the applet, but my hosting restrictions do not allow enough storage in my area to duplicate the files there (it is a shopping cart host). I have tried writing a php script that changes the header to match the content type and then reads the file contents, which works when I directly access the script, but is not executed by the php daemon when your script accesses it.

I have tried modifying your process.php script to do the same and read the remote file contents, but it seems that when passing the variable for the file name to the applet it does not like the remote url and the process.php script is never called (File not found error.)

At this point I am considering off-the-wall things such as making a symlink that calls the php daemon with the script to hopefully "act" like the file is local.

Any suggestions? Is there functionality for downloading remote http files (maybe via php script)?

Re: Download Remote File via HTTP

Posted: Fri Aug 17, 2012 7:10 pm
by support
You mean that your files are not on the server where process.php is running, correct?

If yes, then try to make JFileDownload works (with small file) with provided process.php. Make sure you've integrated explorer.php for download support.

Once done, you have to modify explorer.php (the part with download action) and use your code to get remote file.

Does it help?