I would like to create a very simple php protector on an arbitrary binary file, where the user enters a password and the file is downloaded to their computer, but they must enter the password each time they want to download.
In the first answer to the question Easy way to password-protect php page, the line include("secure.html");
seems to require that the file has to be displayable ascii, renderable by the browser.
Is there a way to protect a binary file, say foo.bin
with the same level of simplicity (and similar limited degree of security)?