$text, 'time' => $time); } } function GetMympsRand($type = 'engber', $number = 4) { $hash = ''; if ($type == 'number') { $chars = '456789'; } else if ($type == 'english') { $chars = 'abcdefghjklmnpqrstuvwxy'; } else if ($type == 'engber') { $chars = '3456789abcdefghjklmnpqrstuvwxy'; } $max = strlen($chars) - 1; mt_srand((double) microtime() * 1000000); for ($i = 0; $i < $number; $i++) { $hash .= $chars[mt_rand(0, $max)]; } $max = $chars = $type = NULL; $hash = strtoupper($hash); return $hash; } function GetRand($nxarray) { $nxarray = $nxarray ? $nxarray : array(0, 5, 10); $nxarr = rand(0, count($nxarray) - 1); return $nxarray[$nxarr]; } ?>