Re: Preventing Access to Private Files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/6/07, Stephen <stephen-d@xxxxxxxxxx> wrote:
> I understand how to use PHP with MySQL to have a
> members table to validate passwords. And to limit the
> generation of "member" pages to members only.
>
> But what about photographs? If someone knows the
> complete URL they could view it directly, unless the
> directory is protected using .htpassword
>
> But I don't want to have passwords in two places, nor
> muck with the password file everytime a new member
> joins.

you could use a PHP wrapper file, and do something like:

if(is logged in and has rights) {
 passthru('file.jpg')
} else {
header("location: somewhere else");
exit();
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux