- substr: documentation ( source)
- hash: documentation ( source)
- hexdec: documentation ( source)
<?php
$verify = array(
"seed" => "9c3dabc67538ac6d725659b8172e0827a2b700f330ec8d443ee597f4ec575c77",
"salt" => "05eba7cea3",
"round_id" => "215358"
);
$win_num = hexdec(substr(hash("sha256",$verify['seed']."-".$verify['salt']."-".$verify['round_id']),0,8)) % 15;
echo "Result for game #".$verify['round_id'].": ".$win_num;