Created
May 3, 2010 08:00
-
-
Save Siedrix/387862 to your computer and use it in GitHub Desktop.
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
function randString(){ | |
$n = 20; | |
$characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
$string = ""; | |
$l = strlen($characters); | |
for ($i = 0; $i < $n; $i++) { | |
$string .= $characters[rand(0, $l)]; | |
} | |
return $string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment