Page 1 of 1

Serial Number Generator

Posted: Mon Oct 04, 2010 2:55 pm
by iamfromk
Hi,
I need the algorithm of Serial Number Generator provided as an example with InstallAware package. I want to generate the serial on server side with PHP from customer name and company and after that to email the generated serial to the customer. Please help.
Thanks

Re: Serial Number Generator

Posted: Mon Oct 04, 2010 6:39 pm
by mills
In the Serial Number Validator sample, the included script, Serial Number Generator has all the logic laid out for you.

Re: Serial Number Generator

Posted: Tue Oct 05, 2010 8:03 am
by iamfromk
mills wrote:In the Serial Number Validator sample, the included script, Serial Number Generator has all the logic laid out for you.

Yes i have checked that script file but unfortunately i can't replicate in PHP this 2 lines:

Set Random Number Generator Constants = 24337, 17312
Set Random Number Generator Seed = 31415

if someone have done this before maybe will give me some ideas ?
Thanks.

Re: Serial Number Generator

Posted: Tue Oct 05, 2010 4:20 pm
by mills
It's not clear what the constants are used for. I'm going to look at the code to see if I can find out what it does.

The seed should be pretty straight forward.

For PHP, you'll probably want to use srand() or mt_srand()

Re: Serial Number Generator

Posted: Thu Oct 07, 2010 5:51 am
by mills
How about creating a single-executable using the sample to generate the serials for you?

You can have it write the serial to file and call it using PHP's exec()...

Re: Serial Number Generator

Posted: Thu Oct 07, 2010 8:13 am
by iamfromk
Thanks for your responses. I solved this problem :) i have written my own key generator and validator to be able to integrate with the serverside key generator :)
Thanks.

Re: Serial Number Generator

Posted: Fri Dec 17, 2010 5:22 pm
by lifer
iamfromk wrote:Thanks for your responses. I solved this problem :) i have written my own key generator and validator to be able to integrate with the serverside key generator :)
Thanks.

There is a way to share you app?
Or does anyone know from where to download ?