<?php
function random_code()
{
$string = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz0123456789";
$randval = '' ;
for($i = 0;$i <= 10;$i++)
{
$num = rand() % 62;
$tmp = substr($string, $num, 1);
$randval = $randval.$tmp;
}
echo $randval.uniqid(true);
}
random_code();