Created
November 9, 2015 16:17
-
-
Save Ambalus/53e6e97c4ae6115ba6e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 genpass($length = 16) { | |
| $ch = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
| $string = ''; | |
| for ($i = 0; $i <= $length; $i++) { | |
| $string .= $characters[mt_rand(0, strlen($ch)-1)]; | |
| } | |
| return $string; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment