If I remember correctly, random(start, end) will only return a random number within [start, end)
It's a bit different to generate a random character. Here's one way to generate a random upper-case letter:
PHP Code:
char(int(random(65, 91)));
You can look at an ascii table to see where I get the 65 and 91 from. You could also look at an ascii table to get the ranges for lower-case letters.
Or, you could predefine an array of all the characters you want to include in your random strings, then use randomstring().
Example:
PHP Code:
temp.chars = {"A", "B", "C", "D", "a", 1, 2, 3}; //Put all characters in here.
temp.confCode = randomstring(temp.chars) @ randomstring(temp.chars) @ randomstring(temp.chars);
And, to save as a log/*.txt file you can use savelog2
Example:
PHP Code:
savelog2("snaps.txt", "The boy bought the basketball");