3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Title of this code //php 5.5.12 $start = time(); $expire = time() + 2592000; $proto = 'http://'; $domain = 't2-btsport-live-hls-prod.akamaized.net'; $path = 'out/u/europe/europe.m3u8'; $key = 'A65A28D4A2F97F470624F15E637C205D'; $params = 'ip=2.31.243.204~st='.$start.'~exp='.$expire.'~acl=/*'; //WITH IP //$params = 'st='.$start.'~exp='.$expire.'~acl=/*'; //NO IP function h2b($str) { $bin = ""; $i = 0; do { $bin .= chr(hexdec($str{$i}.$str{($i + 1)})); $i += 2; } while ($i < strlen($str)); return $bin; } $hash = hash_hmac('SHA256', $params, pack("H*", "A65A28D4A2F97F470624F15E637C205D")); echo $proto.$domain.'/'.$path.'?hdnea='.$params.'~hmac='.$hash; ?>

preferences:
35.18 ms | 402 KiB | 5 Q