phphtmlbrowserdownloadforce-download

How to download file in computer silently using PHP?


I want to download the files silently or without prompt to the computer using PHP? OR when click on the download link, can I force to download in defining location? Like C: /dir/dir/myfile.zip? Note that I am asking this for my internal use only, nothing to harm the users.


Solution

  • You can't.

    It simply isn't possible, due to security issues.

    Now, if these are systems on your own private network, and drives are shared and what not, you could write code to write out the files from the server. But, that is all outside of the user's browser. Other methods have included external applications running on the user's computer. When they click a link, the file to be downloaded is added to a queue in a database. The client application gets this data and will download it. AudioGalaxy used to use this method.