<?php
$secret = 'securetokenkey';
[B] $path = '/folder1/file1.jpg';[/B]
// Expiration in seconds (e.g. 90 seconds)
$expire = time() + 90;
// Generate token
$md5 = md5($path.$secret.$expire, true);
$md5 = base64_encode($md5);
$md5 = strtr($md5, '+/', '-_');
$md5 = str_replace('=', '', $md5);
// Use this URL
$url = "http://yourzone-id.kxcdn.com{$path}?token={$md5}&expire={$expire}";
echo $url;
echo '\n\n';
?>