Download Remote File via HTTP

Files and folders downloader add-on with resume support.

Download Remote File via HTTP

Postby matt@b10 » Tue Aug 14, 2012 5:55 pm

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)?
Posts: 2
Joined: Tue Aug 07, 2012 8:24 pm

Re: Download Remote File via HTTP

Postby support » Fri Aug 17, 2012 7:10 pm

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?
User avatar
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Return to JFileDownload


Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.