<?php
$season = "NL2016"; // The Big Picture season number
$zipcode = "1211PA"; // Uppercase, spaces removed
$housenumber = "2"; // House nubmer without any additions
$iban = "12345"; // Last 5 numbers of iban
$secret = base64_decode("c2VjcmV0Cg==");
$symbols = '0123456789ABCDEFGHJKLMNPQRTUVWXY';
$hashSource = $season . $zipcode . $housenumber . $iban;
echo "hash source: $hashSource\n";
$hmac = hash_hmac( "sha256", $hashSource, $secret, true);
$hash = unpack('C*', $hmac);
$token = "";
for($n = 1; $n <= 8; $n++) {
$token .= substr($symbols, $hash[$n] % strlen($symbols), 1);
}
echo "token: $token\n";
>
- Output for 7.0.0 - 7.0.1
- Parse error: syntax error, unexpected '>', expecting end of file in /in/eX85a on line 23
Process exited with code 255. - Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
- Parse error: syntax error, unexpected '>' in /in/eX85a on line 23
Process exited with code 255.
preferences:
178.98 ms | 1387 KiB | 25 Q