I recently created a VB Application that the user will have to register after the trial period with a serial number. Once the user enters in the appropriate information on my web page I am want the web page to generate a "Serial Number" from some type of equasion or equasions, that I can verify with my VB app. I initially was thinking something like A+B*C/D=E and a second group doing something simular so that the final result is something along the lines of 00000-00000. I have do a little PHP scripting before, but I am not sure exactly where to begin on a script like this. Any help is greatly appreciated.
You could always go the easy route and just use some wrapping software to handle it, like Armadillo. I think they give you all the coding you'd need to generate numbers. It'd probably be easier than coding your own generators
You could do it pretty easily with a huge random string stored in a database. Even MD5 could make a usable SN. You do want to make sure that you don't get collisions by checking the numbers against the existing DB, but I think it would be very easy to create.
I agree with jestep -- do an md5 or SHA hash of a known unique value, like the record id. Maybe tack on a constant to the record id to further obfuscate.
Random Guy............Unfortunatly Armadillo only supports Windows, and so far I have developed it not only for 2000, XP and Vista, but also for Windows Mobile, PPC2003, and Android (G-Phone). with future plans for Mac, Iphone, and Java compatable phones. Jestep ........ I though about the DB solution, but my concern is (I am Dreaming here) when 20,000,000 copies are sold I really don't want to have to maintain a DB, and if it is lost for some reason..... Although this brings up a good point...... Perhaps I could base it on the purchasers e-mail address. What could I do with thier e-mail address to make it almost impossible for the average user to determine what to do to get around it, and how would I accomplish it with PHP. On return from PayPal the users e-mail address is passed to my thankyou page. So from that I could automatically do something with it, right, other than display it