function uniqidReal($lenght = 13) {
// uniqid gives 13 chars, but you could adjust it to your needs.
if (function_exists("random_bytes")) {
$bytes = random_bytes(ceil($lenght / 2));
} elseif (function_exists("openssl_random_pseudo_bytes")) {
$bytes = openssl_random_pseudo_bytes(ceil($lenght / 2));
} else {
throw new Exception("no cryptographically secure random function available");
}
return substr(bin2hex($bytes), 0, $lenght);
}
php
<iframe width="100%" height="380" src="http://snipet.teknotit.com/index.php?embed=5b07801aa1370" type="text/html"></iframe>
Texte seul - Permalink - Snippet public posté le 25/05/2018