.htaccess and db authentication

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

 



I was wondering about people's thoughts on file security through php 
using database authentication.

Take the following example:

I have a folder (in webroot) called /videos/ which contains a heap of 
files like so:

video_1_14-06-2002.mpg
video_2_15-06-2002.mpg
video_3_16-06-2002.mpg
video_4_17-06-2002.mpg

Now, in a database I have table with a heap of users, with some sort of 
security identifier which allows them to access only the files they are 
given access to. Now, doing this in PHP is no problem, but I want to be 
able to stop them from 'predicting' what the next filename would be and 
just typing that in.

I thought about using .htaccess, where if they try to access one of the 
files, it sends it off to a php page which authenticates and displays a 
list of files they are allowed to view, although I would like it if 
they had the opportunity to type in the url of the file if they are 
actually authorized to do so.

I would prefer not to keep a file listing of allowed usernames and 
passwords using .htaccess, as this information could potentially be 
updated frequently with a large amount of users (or would this not be a 
problem).

Has anyone implemented this type of system before? are there any good 
resources people know of for this type of thing?

Thanks,
Adam.


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux