...

View Full Version : unique download key



snmt
04-25-2008, 11:50 AM
I'll be selling a record, and inside each record I intend to put a unique download key, that enables the buyer to go to my website, enter the download key, and recieve a link to some mp3 files.

I'm wondering how easy this would be to set up and what would be best to use?.

abduraooft
04-25-2008, 12:03 PM
Generate a random string(alphanumeric) with a suitable length(should be non guessable) and store it in DB. When some one enter a key, compare this with all values in DB. If matched, allow him to proceed and mark this key as used. Else show "Invalid key".
If some one enter a used key, show a message "Invalid/ already used".

snmt
04-25-2008, 12:14 PM
thanks, what would I use to generate the string, I'd need 200 unique codes. would I use a form to talk to the database?

abduraooft
04-25-2008, 01:00 PM
With some simple serverside script, here is one in PHP,
http://www.codewalkers.com/c/a/User-Management-Code/random-string-generator-key-generator/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum