What I want to do is this:
- MySQL database with list of file URLs ready for download, etc.
- Script gets passed a FileID and the script then runs off, gets the file from the URL the database for that file, BUT doesn't just do a header(location:$FileURL)... I want it to 'read' the file to the browser, no changes to the file, every type of file (mostly binaries).
Basically I want to download a file, but I don't want the browser to see the actual URL of where the file is, I want it to think it's getting 'foo.zip' from my 'download.php'.
I've tried setting the header content-type to binary files, and things like that, but if I use readfile to pass the file through to the browser it just reads it as garbage text.
If anyone can help me out, I've looked everywhere but can't find any information about it.
So... a summary... I want to get a file to the browser, just like someone clicking on a link to the file itself, just I don't want them getting the URL, so I want the script to serve the file to them.
Cheers