[PHP-DB] Re: please help.. serial number generator

2002-08-01 Thread Hugh Bothwell
Rainydays Sunshine [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need to create some kind of 10 digits serial number where I can generate and check that it is valid. Sort of like a checksum.. How many unique values do you need, and how hard-to-fake? I

[PHP-DB] Re: please help.. serial number generator

2002-07-30 Thread JJ Harrison
if u are looking for a simple random string try this php: echo md5(time()); or md5() a random number your choice. md5() genetates a one way non-reversable hash. which could be kept in a db. here is an example of the md5 hash of my library card number: 11d560821fb027c227d837df53a5a73a md5()

[PHP-DB] Re: please help.. serial number generator

2002-07-30 Thread rainydays_sunshine
I need to create some kind of 10 digits serial number where I can generate and check that it is valid. Sort of like a checksum.. Jj Harrison [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... if u are looking for a simple random string try this php: echo

Re: [PHP-DB] Re: please help.. serial number generator

2002-07-30 Thread leo g. divinagracia iii
use the MD5 function and just take the 1st 10 chars or better yet, once you have the MD5 value, use a wacky routine to take the first 10 odd position values... since each time you run the function, it will always return the same value (given the same string parameter...). [EMAIL PROTECTED]