Seems like it would be easier & a little safer to do something like:
PHP Code:
temp.source = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz013456789!@#$^&*()_+[]/,?.|;:";
temp.limit = 25;
temp.repeat = false;
temp.output = "";
for (temp.i = 0; temp.i < limit; temp.i ++) {
temp.randomout = source.charat(int(random(0, source.length())));
if (!repeat && output.pos(randomout) >= 0) {
if (limit <= source.length()) {
temp.i --;
continue;
}else
break;
}
temp.output @= randomout;
}
return output;
Otherwise it's nice
