<?php
$key = "62851589ba33123ae2df";
$seed = "825d16b1c92240efae765d28cd2caa853d5578ffb045ed9e569e5827138aae39";
$nonce = 1;
$hash = hash_hmac('sha512', $index$key . '-' . $nonce, $seed);
$index = 0;
$lucky = hexdec(substr($hash, $index * 5, 5));
while ($lucky >= pow(10, 6)) {
$index++;
$lucky = hexdec(substr($hash, $index * 5, 5));
if ($index * 5 + 5 > 128) {
echo '99.99';
break;
}
}
$lucky %= pow(10, 4);
$lucky = sprintf('%.2f', bcdiv($lucky, '100', 2));
echo $lucky;
- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
- Parse error: syntax error, unexpected '$key' (T_VARIABLE), expecting ',' or ')' in /in/4dmnd on line 9
Process exited with code 255.
preferences:
168.92 ms | 1395 KiB | 36 Q