aikman
07-11-2009, 01:20 AM
I need a 16 digits php/mysql code generator, please
|
||||
I need a code generatoraikman 07-11-2009, 01:20 AM I need a 16 digits php/mysql code generator, please nashville 07-11-2009, 01:24 AM find on google search engine. You'll definitely find one. FWDrew 07-11-2009, 02:00 AM On it sir! When should I have that to you by? I know it's the weekend but I'm willing to work my butt off to fulfill this eloquent request. Do you need anything else done while I am at it? Perhaps some more code I could write for you, that way you don't have to learn anything! Inigoesdr 07-11-2009, 03:38 PM I need a 16 digits php/mysql code generator, please What do you mean code generator? Just a random 16 digit string? sea4me 07-11-2009, 11:05 PM For digits: function CreateRandomCode($len) { $chars = "1234567890"; srand((double)microtime()*1000000); $string = '' ; $len++; for ($i=0;$i<=$len; $i++) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $string .= $tmp; } return $string; } or function CreateRandomCode($len) { $chars = "abcdefghijklmnopqrstuvwxyz1234567890"; srand((double)microtime()*1000000); $string = '' ; $len++; for ($i=0;$i<=$len; $i++) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $string .= $tmp; } return $string; } for letters and numbers Use the function like this: $random = CreateRandomCode(16); |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum