- hash_hmac: documentation ( source)
- gmdate: documentation ( source)
<?php
$method = "GET";
$date = gmdate(DATE_RFC1123);
$privateKey = "MLqksjA7D7a8qsGD6PdD3ADkQSdVDSd2faVBeA9z";
$signature = hash_hmac('sha1', "$method\n$date", $privateKey);
$url = "https://insatnce-dev.opentouch.tv/api/v3/contents?limit=1";
$ch = curl_init($url);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>