Download Remote File via HTTP
Posted: 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)?
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)?