mercredi 4 mars 2020

Create a random number in a range from a fixed and variable denominator

From today's date in time() format and a username I need to create a random number between 900 (15 minutes) and 7200 (3 hours) valid for 24 hours.

$timestamps = '1583334801'; // 03/04/2020
$username = 'donaldtrump';

This random number cannot be stored, so it must be calculated several times a day, the result must be identical for 24 hours.

Do you have an idea on how to do this en PHP?




Aucun commentaire:

Enregistrer un commentaire