Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

URL Signing


We have followed your instructions and example from https://support.jwplayer.com/customer/portal/articles/1433647
We generate the URL using the PHP below but no matter how long we set the expiry for it always says "Permission Denied" in the player.
What am I doing wrong?

function get_signed_url($path,$secret,$timeout,$domain) {

if($timeout) {
$expires = time() + $timeout;
} else {
$expires = time() + 3600;
}

$signature = md5($path.':'.$expires.':'.$secret);
if($domain) {
$url = 'https://'.$domain.'/'.$path.'?sig='.$signature.'&exp='.$expires;
} else {
$url = 'http://content.bitsontherun.com/'.$path.'?sig='.$signature.'&exp='.$expires;
}
return $url;
};

echo get_signed_url('wyMJgZhF-1hrYSmZC.html','REMOVED',36000000,'content.jwplatform.com/players');

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

The path that you pass to us must be everything after //content.jwplatform.com/ , so you most likely need:

echo get_signed_url('players/wyMJgZhF-1hrYSmZC.html','REMOVED',36000000,'content.jwplatform.com');

And why are you setting the timeout for over one year? That pretty much makes the token pointless as anyone could copy it and share it without it expiring.

This question has received the maximum number of answers.