A simple PHP class for random string generation.
Code example below:
include ('RandString.php'); $oRS = new RandStrNS\RandString(); $oRS->part_length = 2; // INT $oRS->parts = 2; // INT $oRS->delim = '-'; // STR $oRS->prefix = ''; // STR $oRS->suffix = ''; // STR $oRS->count = 1; // INT $oRS->unique = false; //BOOL $oRS->flags = 3; // INT Bitmask (000011) $result = $oRS->generate(); var_dump_result();
Will Output:
Array('gR-Fc')