Re: [phplib] protecting served files/images/mp3.... From: Arno A. Karner (karner <email protected>)
Date: 05/22/01

1) the files are already out of the web tree.
2) for every set of permissions you need to create a page that
replicates the security / permissions you want at that particular spot
arrrg, i see hundreds of pages all with different perm check lines. then
if you want to serve multiple images. use some global session array with
permisions and files, then try to figure out which refrence this is, is
this the first or second, third. yes i could use a get var on the links
in img src, but those are fun to play with. i do it on web sites i visit
all the time. lets try this id, that id on get param line.
3) i could mabe use cookies, but i design and use my site with cookies
off, java off.
Because i run maybe 3 browsers in diffrent parts of the app, working on
intagrating more to reduce the need for this, but to me its a great
feature. i dont have to stop what im in the middle of to do somthing
else. if you get lazy and use cookies all web pages from the same
browser share the same session bad idea. Not as useful, if i have to use
netscape, suns web browser then lynx or some crap kinda kills the common
user interface idea.

Alex Black wrote:
>
> I think you might be much better off just moving the files out of your
> document root, and building a page that just pipes through the content of
> the file after doing a "permission" check to see if it's allowed.
>
> Agreed, a class that sens the right mime headers based on the filename of
> best guess at its contents would be cool.
>
> I'm doing essentially the same thing with gifs stored in a database, and it
> works like a charm, and the html is simple:
>
> <img src="foo.php">
>
> _alex
>
> --
> alex black, ceo
> enigma <email protected>
>
> the turing studio, inc.
> http://www.turingstudio.com
>
> vox+510.666.0074
> fax+510.666.0093

-- 
My opinions are my own and not that of my employer even if I am self
employed
Tech Net, Inc.            --FREE THE MACHINES--                 
651.224.2223
627 Palace Ave. #2           karner <email protected>              
karner <email protected>
St. Paul, MN 55102-3517        www.tnss.com         
wanted    : adsl/cable modem with static ip at reasonable price
accept-txt: us-ascii,html,pdf
accept-dat: ascii-delimited,sql insert statments

--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>