8 lines
212 B
PHP
8 lines
212 B
PHP
|
<?php
|
||
|
function password_generate($chars)
|
||
|
{
|
||
|
$data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';
|
||
|
return substr(str_shuffle($data), 0, $chars);
|
||
|
}
|
||
|
echo password_generate(7)."\n";
|
||
|
?>
|