PHP code example of loipv / player-sdk-secure
1. Go to this page and download the library: Download loipv/player-sdk-secure library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
loipv / player-sdk-secure example snippets
use SecureSDK/SecureSDK;
// Init sdk
$appkey = 'appkey';
$secretkey = 'secretkey';
$playerId = 'pid';
$secure = new SecureSDK(appkey, secretkey, playerId);
// If you change token expire time, default: 60s
$expiresIn = 3600; // 1h
$secure.setExpiresIn($expiresIn);
// Or generate token not expired
$secure.setIngnoreExpiration(true);
// Get secure token
$sToken = secure.getSecureToken();