Hi All, I’m going to create all key combinations; simple-letter
passwords and store those in to MySql DB. Using = a-z (simple letters) Password length = 6 Number of possibilities = 26 x 26 x 26 x 26 x 26 x 26 = 308,915,776 This is my code: <?php for($i=0;$i< 500000000;$i++){ $arrPwd[]
= createPwd(); } $arrUniqueData =
array_unique($arrPwd); foreach($arrUniqueData
as $key=>$val){ //
Inserting to DB } function createPwd()
{ $lower
= "abcdefghijklmnopqrstuvwxyz"; $seed_length
+= 26; $seed
.= $lower; for($x=1;$x<=6;$x++){ $
strPwd.= $seed{rand(0,$seed_length-1)}; } return($strPwd); } ?> What is the easiest way to get my output?
Suggesting, comments, code samples are highly appreciate. Thanks in advance, Lasitha.
|
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php