RE: [PHP] Password protect binary files on database.
| From: | John W. Holmes | Date: | Sun, 20 Oct 2002 14:46:22 +0000 |
| Subject: | RE: [PHP] Password protect binary files on database. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120667@lists.php.net to get a copy of this message | ||
> I am currently working on a project that involves uploading binary
> files onto a MySQL database(know that I should be avoiding this, but
is
> is one of the requirements of the project).
>
> The binary files then need to be downloaded. Uploading and downloading
> the files, is not a problem.
>
> Now, the problem is that I need to "password protect" this files on
the
> database before downloading.
>
> Does anyone know if this if possible, and if it is, point me in the
> right direction?
Yeah, it's certainly possible. How are you managing the download now?
All you have to do is throw in a password check before you send the
headers and data for the file. If the password isn't correct, redirect
to an error page.
---John Holmes...