mirror of https://github.com/itflow-org/itflow
19 lines
383 B
PHP
19 lines
383 B
PHP
<?php
|
|
|
|
function keygen()
|
|
{
|
|
$chars = "abcdefghijklmnopqrstuvwxyz";
|
|
$chars .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
$chars .= "0123456789";
|
|
while (1) {
|
|
$key = '';
|
|
srand((double) microtime() * 1000000);
|
|
for ($i = 0; $i < 16; $i++) {
|
|
$key .= substr($chars, (rand() % (strlen($chars))), 1);
|
|
}
|
|
break;
|
|
}
|
|
return $key;
|
|
}
|
|
|
|
?>
|