Providing Security for Download Files from website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vicky_rk13
Forum Newbie
Posts: 2
Joined: Tue Jul 08, 2008 12:43 am

Providing Security for Download Files from website

Post by vicky_rk13 »

Hi guys,

I am trying to Implement a site which provides File for Download after they are purchaced online.

The files for download need to be accessable to download manager after only the user logs in.
and also the file download url should be active for only a specified period say(7 days).

The functionalaty i need is similar to that provided by RapidShare.com, MegaUpload.com etc,

I have no clue how to do it , I would be happy to recive any help about the same...
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Providing Security for Download Files from website

Post by Eran »

Store the files in a non-accessible directory (outside the public directory, or protected with .htaccess), and have PHP send a forced-download after a file has been purchased. Something like this - http://www.ryboe.com/tutorials/php-head ... -download/
vicky_rk13
Forum Newbie
Posts: 2
Joined: Tue Jul 08, 2008 12:43 am

Re: Providing Security for Download Files from website

Post by vicky_rk13 »

Thanks for the reply

Well i was using IIS 6.0 so i enabled Digest Authentication.

and tried downloading a file with the download manager which was ok.

but when i paused the download and tried resuming it i was not able to resume the download.

As my site must host files of large size i.e., in GB's usablity of Download manager and also the file security is a must.


these is where i am currently struck-up.........!
Post Reply