At 4:41 PM -0500 5/28/10, Karl DeSaulniers wrote:
On May 28, 2010, at 4:25 PM, tedd wrote:
At 3:39 PM -0500 5/28/10, Karl DeSaulniers wrote:
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?
Karl:
Just have the download pass through a script that counts, such as found here:
http://sperling.com/freeware.php
When someone click the link, it activates a script that provides
the download and saves a count. It would be trivial to stop the
download at a specific number.
Cheers,
tedd
Hey thanks Tedd.
Quick question. Were you referring me to this link to download one
of their demos or just to show that they count their downloads?
EG: Binary-Tree v1.1 Downloads: 2806
Karl:
What I was showing you was a working example of what you want.
The link simply calls a script that: 1) provides the download for the
user; 2) writes a count to a file.
You also said:
The users will have gone through a registration and login to get to
the downloads.
The files will be served from MySQL and output to HTML of Flash.
This is for a small project of limited edition audio or pictures or
scripts, etc.
Hens, "I'd like" to limit each user in the allotted 150 to be able
to download (whatever it is) only once.
But up to 150 users can get in on it kind of thing.
That's simply a two step problem. 1) filter the people who can access
the link (only approved members); 2) then have the protected link be
tied to a script that monitors the download count for that member.
It should be easy enough to create a table for each member having
their logon id, password, and download count for whatever item you
want to restrict download.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php