Secure mp3 Download app

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
User avatar
fendtele83
Forum Commoner
Posts: 27
Joined: Tue Oct 25, 2005 2:21 pm
Location: Woodbridge, NJ

Secure mp3 Download app

Post by fendtele83 »

I'm going to be working on a project where thousands of users will be purchasing a CD online and then downloading the songs as mp3s.

What is the best, most secure way to allow access to the mp3 files to the user once the transaction has been processed? Are there any 3rd party applications that take care of this?

The main thing is that thousands of people will be doing this w/in minutes.
AGISB
Forum Contributor
Posts: 422
Joined: Fri Jul 09, 2004 1:23 am

Post by AGISB »

You create a specific directory for that user, password protect it and copy the files to that directory and delete it after a specific time.

You can also write the allowed songs into a database and display the download links to that users loginpage.
The key here of course is that you got a registration for the user. If not you can use the one above.
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post by jmut »

What you will need is a script that will serve the file using some id or something stored in a database.
All mp3s are out of web root.
This is the most secure way as far as I know.

Checkout this document.

http://www.paladion.net/pdf/Document_Se ... ations.pdf
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

As already mentionned, all you need is a 'download' script and implement whatever restrictions you want... (Both problems have been answered many times before, so i'm pretty sure you'll find answers with a little search)
Post Reply