generate unqie life time random number for each number [closed]

You could use the given number as a seed and generate the number using the standard random number function.

function getrand($num)
{
    srand($num);
    return rand(1 , 30);
}

Leave a Comment