Jump to content

What is This Called?


TheMayhem

Recommended Posts

I've been trying to find tutorials/coding today related to controlling the ability to download files. The problem I think I'm having because I know it exists is I don't actually know what it's called. Below is kind of a basis for a tutorial or describing what I'm trying to do.

 

 

I'm trying to find a tutorial or a how to on storing downloadable files either in a Mysql Database &/or on the file server system. I want to make it so that only users that are stored within the user database who have certain rights or a field can be able to download a file. Those users who don't have the proper permissions in the user table will not be able to and those who do when they go to download a file, will be able to. I know these scripts use PHP but am not really sure where to begin on my search because I don't even know what file permissions coding they are using.

Link to comment
Share on other sites

What you are asking about has nothing to do with download functionality. What you are looking for is a method to control functionality based upon permissions. There is no "name" for what you are asking - other than a permission based functionality.

 

Step #1: is to implement a file download functionality. IMPORTANT: you want to store the files in a folder that is not web accessible. When the user requests the file you would read the file and output directly to the browser. Take a look at any download scripts and they *should* have that functionality.

 

STEP #2: Implement a permission check in the download script. A) user requests file, B) Script checks user's permission c) If user has rights continue with the download otherwise display appropriate errors.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.