Skip to content

Instantly share code, notes, and snippets.

@firstclown
Created February 19, 2014 17:39
Show Gist options
  • Save firstclown/9097226 to your computer and use it in GitHub Desktop.
Save firstclown/9097226 to your computer and use it in GitHub Desktop.
function generateRandomString($length = 15)
{
return substr(sha1(rand()), 0, $length);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment