Hi , i wasnt sure where to post this , it also could be posted in the Tutorials Forum.
Ok here we go , ever wanted to generate keys for your games and with this key make a shareware game to a full Game ? Then this contributaion is maybe interesting for you
You can download the complete code at the end of this Post but first read how it works.
I made a text file called "chars.txt" in this file i typed randomly (more secure) chars from "a - z" , "A - Z" and "1 - 0"
While generating a key the script is picking randomly chars out of this Text file and adds the number of steps to this char to a VAR called "temp_limit_maximum" . There is another VAR called "limit_maximum" (used to compare both VARs) you can enter a number here for example if its a high number the generated key is longer . After generating the key , you can test it , enter a key and if the key you entered is the same as that generated one , your key is a valid key. You get the idea what your able to do with it now ...right ? you can generate keys for your game and generate a key for your customer (for example)
In the text file there is no small "l" and no big "I" because they look the same in some fonts.
Start the code in SED and try it , after that check the code and you get the Idea . For Example if your generated key looks like this "Gfsj34n" you can also enter "sjGf4n3" its also valid because the nummer in "temp_limit_maximum" is the same . The important thing here are , the Chars must be the same as the generated one.
You can make it more complex if you like (its easy done with a little more code), its up to you . My script is just to show how it works.
Download the Code (save as)