random1 Posted October 14, 2008 Share Posted October 14, 2008 How do you make downloads (.exe etc) secure so that they can not be downloaded directly using a browser or download manager app without a username and password? I also want the download to be outside the web directory so that direct access is impossible. Is this a good approach? Link to comment https://forums.phpfreaks.com/topic/128308-securing-important-downloads/ Share on other sites More sharing options...
xtopolis Posted October 14, 2008 Share Posted October 14, 2008 First, nothing is impossible. What you're trying to do is require a user to use your page as a gateway to a file. Your php file, once the user appropriately authenticates, would access the file locally, read the file into memory, and output to the user with the appropriate header info(as a download if you make it so). Yes, placing your files in a non WWW accessible folder is a good approach. functions that may help (file_get_contents , readfile) Link to comment https://forums.phpfreaks.com/topic/128308-securing-important-downloads/#findComment-664658 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.