Tuesday, July 28, 2009

PHP code that allow people to download without revealing URL?

I need some PHP script that can allow people to download something from my website, without revealing the position of the things they want to download.





Can someone tell me something for this ?

PHP code that allow people to download without revealing URL?
One solution I've seen used is to have a DOWNLOAD.PHP file which accepts a single number as a variable through the URL. The number will be an ID which can be used to identify a file. Normally this ID would then be looked up in the database, which would then either contain the file path of the file, or be stored in the database in BLOB form.





From there, then just send the file to the user from wherever it's located. This helps obscure the location from the normal user when they simply hover the cursor over the link.





Keep in mind I've never actually employed this myself, but those are the basics on how it's done.


No comments:

Post a Comment