Skip to content

Instantly share code, notes, and snippets.

@manutheblacker
Forked from Michaelkodji/index.php
Created May 27, 2020 11:33
Show Gist options
  • Save manutheblacker/f2c9dbf4a3a00852af13c88737ac6bdb to your computer and use it in GitHub Desktop.
Save manutheblacker/f2c9dbf4a3a00852af13c88737ac6bdb to your computer and use it in GitHub Desktop.
Generate a automatic code
<?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