function generateRandomString($digits) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$randstring = '';
for ($i = 0; $i < $digits; $i++) {
$randstring .= $characters[rand(0, strlen($characters))];
}
return $randstring;
}
echo generateRandomString(24);