Created
June 13, 2016 04:26
-
-
Save RickySu/74ece5a1e8a202c9c0add7a38abc2806 to your computer and use it in GitHub Desktop.
code generater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$limit = 30; // 產生組數 | |
$base32 = array_merge(range('A', 'Z'), range(2, 7)); | |
$length = 6; | |
for($i = 0; $i < $limit; $i++){ | |
$code = ''; | |
for($j = 0; $j < $length; $j++){ | |
$code .= $base32[rand(0, 31)]; | |
} | |
echo "$code\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment