Protect File Download

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
virbb
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2009 3:55 am

Protect File Download

Post by virbb »

Hello everyone !

I'm looking for a way to protect the download of certain files on a wesbite i'm running. (wordpress powered).

The website itself is available to anyone and referenced on Google, Yahoo etc and that's ok.
The thing is there are some files that i want to protect.

These files are aimed towards my co-workers. So i want them to be able to download the files by providing their reference number (a combination of numbers/letters).

Since there are dozens of people in the team, there are many reference numbers.

I have these reference numbers in an excel spreadsheet.

Is there a way to use this spreadsheet as a database and lock the access to the files unless the password provided is correct (matches a reference number in the spreadsheet) ?

THANK YOU !!
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Protect File Download

Post by Mordred »

There's no ready-made way, it would need some custom coding. Are you up to it?
virbb
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2009 3:55 am

Re: Protect File Download

Post by virbb »

Hello,

thanks for replying.

Yep i'm up to it. What can you suggest ?
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Re: Protect File Download

Post by Mordred »

1. export the ref numbers to a text file
2. upload the files in a folder not accessible from the web
3. write a script that, when given a file name (or better - some id) and a ref number checks if the ref number is in the list and if so, sends the file to the user.
virbb
Forum Newbie
Posts: 3
Joined: Sat Feb 07, 2009 3:55 am

Re: Protect File Download

Post by virbb »

Hi,

i'm ok with steps 1 and 2 but i should've mentionned i'm only learning php for two weeks now.
Would you be able to come up with a solution to this ?

i'm willing to pay

Thanks
Post Reply