Jump to content

Members Only Downloads


spelltwister

Recommended Posts

Hey all,

 

Just wondering if anyone knows of a script that will perform (at least most of) the following tasks:

 

1. Hide the files actual location from the user (possibly not needed as I can store files outside of wwwroot).

2. Manage users who are allowed to download the file(s)

3. Will show all files in the folder for download without needing to set a link to each file manually

 

I can do the first two myself if there are no scripts readily available, however, the third, I'm not sure on.  Any direction on that would be appreciated.

 

Mike

Link to comment
https://forums.phpfreaks.com/topic/55117-members-only-downloads/
Share on other sites

Well, just thinking outloud here, if the file isn't that big you could do this:

 

Have a PHP script that will anyalyze if a user is authorized to download the file. If they are then the PHP could create a duplicate (copy) of the file inside a directory with a random name.

 

Then you could eitheir have a confirmation of download or have a cron run a PHP script every so often to check for an "expired" file, then delete it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.