RE: [PHP-DB] File Downloads

[email protected] (Adam Schroeder)
Newsgroups php.db
Message-ID <7345EF83BDFD384CA49176C8ABD25EA9082D8767C1@YUMA>
Hi Karl --

You can store the file contents outside of the web tree and use PHP to "read" the contents.  This allows you to place access control restrictions in the PHP script.

This post talks about doing something similar with images.  Obviously, if you have a music track... you'll need to adjust the mime type accordingly.

http://stackoverflow.com/questions/258365/php-link-to-image-file-outside-default-web-directory/258380#258380

Good luck.

Adam


-----Original Message-----
From: Karl DeSaulniers [mailto:[email protected]] 
Sent: Friday, May 28, 2010 1:39 PM
To: [email protected]
Subject: [PHP-DB] File Downloads

Hello,
How can I go about restricting the number of downloads of a file on  
my server?
For Eg: if I want a music track to only be able to be downloaded by  
150 people and thats it.. ever,
how can I go about doing this?

Much obliged,

Karl DeSaulniers
Design Drumm
http://designdrumm.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.