jeudi 11 octobre 2018

How can generate php random string by once per day?

Hi i have a code for generate random strings, but i want generate random strings once per day. This code generating random string by every loading page how can i do this?

function random_string($length) {
$key = '';
$keys = array_merge(range(0, 9), range('a', 'z'));

for ($i = 0; $i < $length; $i++) {
$key .= $keys[array_rand($keys)];
}

return $key;
}
$sehiradi = "diyarbakir";
$subdomainadi = "$sehiradi."."".random_string(5);




Aucun commentaire:

Enregistrer un commentaire