public static function generateSomewhatRandomString($length = 22)
    {
        $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";
        srand((double) microtime() * 1000000);
        $i = 0;
        $somewhatRandom = '';

        while ($i < $length) {
            $num = rand() % 60;
            $tmp = substr($chars, $num, 1);
            $somewhatRandom = $somewhatRandom.$tmp;
            $i++;
        }

        return $somewhatRandom;
    }