Well, it sounds like you need a random number generator, plus the date...so....
//capture current month day year
$curDate = date("mdy");
//generate random string
//set length of string
$length= 6;
static srand;
if($srand != true) {
$srand = true;
srand((double(microtime()*1000000);
}
$chars = "1234567890";
for ($i=0;$i<$length;$i++) {
$result .= substr($chars, rand(0, strlen($chars)-1),1);
}
$RandomVar = "$date$result";
Hope this helps. I've been using this for quite some time now 🙂