Skip to content

Instantly share code, notes, and snippets.

@RickySu
Created June 13, 2016 04:26
Show Gist options
  • Save RickySu/74ece5a1e8a202c9c0add7a38abc2806 to your computer and use it in GitHub Desktop.
Save RickySu/74ece5a1e8a202c9c0add7a38abc2806 to your computer and use it in GitHub Desktop.
code generater
<?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