Page 1 of 1

Secure file delivery system?

Posted: Wed Oct 25, 2006 4:06 pm
by typewriter
Hello,

I'm looking for some ideas about implimenting a file delivery system.
The site will allow users to browse from a collection of thousands of files,
and upon selection and purchase, they need to be able to retrieve their
selected file.

I am thinking about storing the files using a filename encryption system, generating
a long filename from their database ID. Then when purchase occurs, the script
will look up the encrypted filename (all files located in the same no-browse directory),
and begin the download.

Is this a good way to do it, or am I overlooking something?

Thank you for your ideas

Kristopher

Posted: Wed Oct 25, 2006 4:10 pm
by feyd
If you make sure that you build in directory partitioning, it should be okay. In many file systems, there's a barrier for number of files inside a directory that when passed begins to degrade performance of any file system functionality requested in it.

Posted: Wed Oct 25, 2006 5:37 pm
by typewriter
Excellent. Good point. Thanks feyd.

Making algorithms for generating chaotic strings is fun and easy in PHP.
Md5, sha1, crc32, rot13, strrev....