function makeRandomPassword($Len=8) { $salt = 'ABCDEFGHJKLMNPQRSTUXYZabchefghjkmnpqrstuvwxyz()%*^~#_<>;:&23456789'; srand((double)microtime()*1000000); $i = 0; $Password = ""; for ($i=0; $i < $Len; $i++){ $num = rand() % strlen($salt); $Password .= substr($salt, $num, 1); } return $Password; }