Created
May 27, 2020 11:30
-
-
Save Michaelkodji/f185ae390ec81b2ae36a3e7c0d3b0939 to your computer and use it in GitHub Desktop.
Generate a automatic code
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 | |
function passgen2($nbChar){ | |
return substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCEFGHIJKLMNOPQRSTUVWXYZ0123456789'),1, $nbChar); } | |
echo passgen2(9); | |
// Affiche un password comme : M9ytp5Pbcn | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment