Guest User

Untitled

a guest
Jan 17th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. function generatehash($length=8){
  2. $chars='qwertyuiopasdfghjklzxcvbnm1234567890';
  3. $numshars = strlen($chars);
  4. $hash = '';
  5. for ($i=0; $i < $length; $i++) {
  6. $hash.=substr($chars, rand(1,$numshars)-1, 1);
  7. }
  8. return $hash;
  9. }
Add Comment
Please, Sign In to add comment