I am using the following code to generate random number:
$random = mt_rand(1000000000,10000000000);
It works perfectly on localhost, but on the server It outputs exactly same number. Is there any thing I can do to prevent duplicate results? Actually i tried to use
mt_srand();
But i did not know how to use it.
Aucun commentaire:
Enregistrer un commentaire