3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = time(); $expire = time() + 2592000; $proto = 'http://'; $domain = 't2-btsport-live-hls-prod.akamaized.net'; $path = 'out/u/bts1/642_6.m3u8'; $key = '0326ebdb3e654166a66d3c62'; //$params = 'ip=1.2.3.4~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, h2b($key)); echo $proto.$domain.'/'.$path.'?hdnea='.$params.'~hmac='.$hash; ?>
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
http://t2-btsport-live-hls-prod.akamaized.net/out/u/bts1/642_6.m3u8?hdnea=st=1459368084~exp=1461960084~acl=/*~hmac=fe5104bd2f225bd2c7f4eaaf9f332de967f4c886da7f40ac931d3dca2bdbcc42

preferences:
145.35 ms | 403 KiB | 159 Q