function Random() { $chars = "abcdeghjklmnopqrstuvwxyz23456789"; srand((double)microtime()*1000000); $i = 0; $pass = '' ; while ($i <= 4) { $num = rand() % 32; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } $randomcode = Random(); ?>