Created
April 12, 2013 14:38
-
-
Save flacodirt/5372475 to your computer and use it in GitHub Desktop.
Random passphrase generator will return random characters 33 - 126
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
/** | |
* randomPassphrase | |
*/ | |
function randomPassphrase ($len = 12) { | |
$r = ''; | |
for ($i=0; $i<$len; $i++) { | |
$r .= chr(mt_rand(33,126)); | |
} | |
return $r; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment