For the security sector, I neet to create a string that is constantly changing. something like choosing as random from a array:
$arr = array ('asfsdg','t3hbwed','gwefa@','43fsd4');
$string = $arr[array_rand($arr)];
But there is no array (because the number of array items are limited) and i need to generate a string that is not already defined. In other word, How do I generate a string that its duplicate possibility be too low.
e.g: With 'a', 'b'
, we can generate 2*3=6 modes
a, b, ab, ba, aa, bb
e.g: With 'a', 'b', '1'
, we can generate 3*3*3=27 modes
a, b, 1, ab1, 1ab, ba1, etc ...
Now i want to create a system to generate me a string that be one of the results of (for example) 'a', 'b', 'c', 'd, '1', '2', '@', '#'
. In addition, the system generates a string randomly each time. some thing like this:
1ad@cb2#
EDIT
I already asked this question: How to prevent crawlers depending on XPath from getting pages contents
Now i want to create class name for my classes.