Forum Moderators: buckworks
What I don't know how to do is set up the actual page for them to download from. It can't be something anyone could access once they know the url, for obvious reasons. If, once they pay, a password is made available to them, they could just give the password to someone else. Unless some other scripting is used to assign each purchase its own password. That is not something I know how to do though. And how do you handle situations where a person tries but is unable to download the files successfully in a given time frame?
Maybe I'm making this more difficult than it should be, or maybe it really is more difficult than it seems.
Has anyone had experience with this? Are there scripts already available? I though about doing a search for a script for this, but really didn't know what search terms to use - I don't really know what it would be called.
Thanks, I would appreciate any help with this.
that's really an interesting question. i would create an application that serves the mp3 file. this application needs a access rule (verify that the download is paid) and serves the file only once completely. if the download interrupts, this does not count. if the download completes, then it times out. to prevent people from stealing parts of an mp3 (because you can stream them, ie you don't need to completly download), i would zip the files.
Now you just need to figure out what scripting languages are available on the host and start looking for "[language] download scripts" or something like that.
You will still have to tweak it a bit after that I would imagine. What kind of return code do they send once they've paid? Maybe you could use that for the original access then proceed as hakre suggested.
hakre's suggestion sounds great, doesn't sound that easy to me though. Php is available, and is what I would prefer to use, although a perl cgi solution would be fine too.
I will try searching for 'php download scripts' as was suggested. All I could think of before was to search for 'mp3 download software', which I'm pretty certain wouldn't give me what I want.
You could use PHP to track sessions, and pass files through PHP to authenticated users...try searches for "php passthrough" also. You'll probably have to be mindful of the PHP timeout value set in php.ini so downloads don't cut off prematurely.
Another option is to run a cron that uses temporary symbolic links to give users an URL that lasts a day, say:
[yoursite.com...]
and use cron to remove those symlinks when the download time limit window closes.
I briefly searched google, but didn't see anything like what I'm looking for.
I think I have two options:
1 - oscommerce, I found a thread on their message board about how to set something like this up with it. They have a stable version of 2.2 out now, which I've been waiting for for a while. It may be fun to play with too.
2 - the client sent me a link to a site who has something like this set up. I sent an email to the webmaster asking how it was done. Maybe they can tell me what script they are using or can send me in the direction of the person who did it for them.
The oscommerce option looks more likely to be the one I'll be using.
Thanks for all your help!