Forum Moderators: coopster

Message Too Old, No Replies

file download access for usergroups with php

         

till7

12:30 pm on Jun 10, 2003 (gmt 0)

10+ Year Member



help!
i'm implementing an up- and download module for my community site and don't know how i can make certain files accessible for certain usergroups. all files are stored in the same directory.

is there a way for a server side script to decide if a download sould be started or not?

thanks
tom.

jatar_k

4:52 pm on Jun 10, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld till7,

What about a Groups/Permissions table in the database (I assume you use one). Then you can check their permisions and see what files they are allowed to see and only display those on the download page page.

till7

5:43 pm on Jun 10, 2003 (gmt 0)

10+ Year Member



hi jatar,
thanks for your time!
i have already implemented the whole group- and accessmanagement in my mysql db. the user only gets displayed the files he is allowed to see.
it's the first time i'm dealing with downloads.
as all files are in one folder on the server which has permissions for downloading, the user could just download other files from this directory by trying (or maybe he can even read the directory?).
i'm currently displaying the files and linking straight to them, which is not the best solution anyways, because if you click on the link and it's a text file, you don't download it, but you get it displayed in your browser window.
it might be really simple (hope so!).
thanks for tips
tom.