Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function generatehash($length=8){
- $chars='qwertyuiopasdfghjklzxcvbnm1234567890';
- $numshars = strlen($chars);
- $hash = '';
- for ($i=0; $i < $length; $i++) {
- $hash.=substr($chars, rand(1,$numshars)-1, 1);
- }
- return $hash;
- }
Add Comment
Please, Sign In to add comment