Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
PHP authentication example to Ankoder. (Thanks to GangOfCoders)
<?php
$ankoder_access_key = "GET YOUR ACCESS KEY FROM SETTINGS";
$private_key = "GET YOUR ACCESS KEY FROM SETTINGS";
$ankoder_date = date("r");
$ankoder_action = "GET";
$ankoder_path = "/video.xml";
$string = "-{$ankoder_date}-{$ankoder_action}-{$ankoder_path}-";
$salt = substr(sha1($string),0, 20);
$passkey = trim(base64_encode(hash_hmac('sha1', $salt, $private_key, true)));
$url = "http://api.ankoder.com/video.xml";
$curl = curl_init();
$header = array("ankoder_access_key: $ankoder_access_key", "ankoder_passkey: $passkey", "ankoder_date: $ankoder_date");
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_exec($curl);
curl_close($curl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.