Day 23 fix
This commit is contained in:
19
Day 23/generatePasswords.php
Normal file
19
Day 23/generatePasswords.php
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
$charset = 'abcdefghijkmpqrstuvwxyzABCDEFGHJKLMPQRSTUVWXYZ23456789';
|
||||
|
||||
for($t = 0; ; $t++) {
|
||||
|
||||
srand($t);
|
||||
$rand_str = "";
|
||||
|
||||
for($j = 0; $j < 12; $j++) {
|
||||
$rand_key = rand(0, 54 - 1);
|
||||
$rand_str .= $charset[$rand_key];
|
||||
}
|
||||
|
||||
echo "$rand_str\n";
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user