I am looking for a way to hide the source of my download. I am surprised that this is not yet covered, but it also makes me wonder if this is possible.
( Edit: Hidden, I mean that it is difficult or impossible for the end user to find a direct link to the file. Thus, they will be forced to actually be on the page, clicking on it, for it should work.)
I found a script to force download files that are stored locally. The way I see it hides the true source (at least it is not the source of the source or download history).
http://w-shadow.com/blog/2007/08/12/how-to-force-file-download-with-php/
So this works, I turned it into a function that gets the linkID, and checks it with the DB for the actual source of the files. Hooray!
Only if your downloads are on a different server? Then you cannot use most of the functions used here (e.g. files readable, fopen, ...). I'm not good enough to decide if it is possible / possible to do this cross-server work.
I understand that maybe my web server will lose bandwidth even if the files are not stored there, which is not a big problem.
Any information on this subject would be greatly appreciated. I prefer PHP, but I can work with what you give me, I really have no idea about it.
source share