Product CD Keys.
BlitzMax Forums/BlitzMax Programming/Product CD Keys.
| ||
Hay guys.. I have been working on some Product CD Key Stuff, my goal with this is to do two things. 1. Create a Unique CD KEY per product per instance of product 2. within product accept a key, then authenticate it. At the moment the above is done, with my code I give each product a pass phrase, normally it will be the project name like My Uber Game" or something, my code then outputs a list of a set length, I think 10,000 keys would be a nice start, and dumps them to a text file 1 key per line. My Authentication code can then look at a key, and see if it's authentic or not. I then plan to save the key to file locally on the users computer I am then able to do stuff like If cdkey.valid then do cool game stuff else do crappy game stuff end if any thoughts? |
| ||
any thoughts? Yes. Because I've already done the same when I was going to sell Magicville via BMT Micro.I wrote a PHP script which generates a unique key for my game, plus the customer's email address and some other information. All of that goes into a single string. Produce an MD5 hash of that, shuffle it about some, format it so its more readable, bish bash bosh, unique key. Convert the same PHP code to Blitzmax and I have a PHP version to generate codes, and a Blitzmax version for in my games to authenticate them. Works brilliantly. Plus, if any 'legitimate' (as in, bought) keys turn up on the net, they're traceable to a specific user. Its all a bit of a faff, though. |
| ||
That's exactly what iv done. But I have still to code the php and sql for it so at the moment just the max code is done. Reason for my post now that some has replied with the same train of thought I wana run something by you. My database is planned at the moment to hold ID,Key,E-Mail,Product Now I was planning to fill that table with 10 thousand keys, then as a user buys a key to unlock something in one of my games, they can either use the key and be done with it, or they can register their key, binding it to their e-mail address which would find the key in the database and fill in the users e-mail locking that key to that user. that way people dont need to register their key and e-mail they can just use their key, but if they want to register it they can allowing them to retrieve it at a later time if they happen to lose it. BUT!!! I was also considering requiring the user to be online, and force the user to register the key with an e-mail address locking it to the user right off the bat. Not sure which way to go really, the whole key thing is simply to discourage it from a torrent site, those users who will crack it if they can im not all that worried about cos they probably wouldnt have paid for it anyway. So, force them to register online ? or let them pick. |