- substr: documentation ( source)
- hash: documentation ( source)
- hexdec: documentation ( source)
<?php
$server_seed = "62afb1631cdf2a4b4e3b33690bd153aca604c59041bb487a0ff623235dc93698";
$round_id = "27634";
$hash = hash("sha256",$server_seed."-".$round_id);
$roll = hexdec(substr($hash,0,8)) % 15;
echo "Round $round_id = $roll";