RE: [PHP-DB] File Downloads
| From: | Adam Schroeder | Date: | Fri, 28 May 2010 21:18:43 +0000 |
| Subject: | RE: [PHP-DB] File Downloads | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47196@lists.php.net to get a copy of this message | ||
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:karl@designdrumm.com]
Sent: Friday, May 28, 2010 1:39 PM
To: php-db@lists.php.net
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