-
-
Save grim-reapper/128a3c26098351146e0da962e90cfe53 to your computer and use it in GitHub Desktop.
Random Keygen
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 keygen($length='40'){ | |
| $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
| $size = strlen($chars); | |
| for($i = 0; $i < $length; $i++): | |
| $str .= $chars[ rand( 0, $size - 1 ) ]; | |
| endfor; | |
| return $str; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment