View Full Version : unique download key
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?.
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".
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?
04-25-2008, 01:00 PM
With some simple serverside script, here is one in PHP,
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.