Protect Streams with signKey

Here is how you can protect your video content from hotlinking. This will make your links expire within the timeframe you define. So even if someone steals your links and place them in his website they will not work anymore after the minutes you have defined in your signature.

You need to activate signKey protection in the dashboard and then simply create in your script a code to generate a GET variable and append it to the video URL.

In PHP the code you should use would be:

$key = 'yourSignKey'; // here you replace with the signKey we give you
$validminutes = 10; // change as you wish
$today = gmdate('n/j/Y g:i:s A');
$str2hash = $id . $key . $today . $validminutes;
$md5raw = md5($str2hash, true);
$base64hash = base64_encode($md5raw);
$urlsignature ='server_time=' . $today . '&hash_value=' . $base64hash .'&validminutes=' . $validminutes . '&id=' . $id;
$base64urlsignature = base64_encode($urlsignature);

Then you would only need to append


For example if your have your MP4 video at:

Then you would need to change it to:<?=$base64urlsignature?>

in your player for the video to work.

Use the same PHP code with the appropriate syntax in any coding language you are currently using for your website and secure your videos from hot-linking that easy.