will anyone help me?
$UserToken = "insert yours";
$hmac_key = "JuLQgyFz9n89D9pxcN6ZWZXKWfgj2PNBUb32zybj";
$method = "POST";
$url = '/video/playouts/vod';
$time = time();
$NBCU = 'NBCU-ANDROID-v3';
$sky_headers = "{'X-SkyOTT-Agent': 'nbcuott.tablet.android', 'X-SkyOTT-Provider': 'NBCU', 'X-SkyOTT-Territory': 'US', 'X-SkyOTT-PinOverride': 'false', 'X-SkyOTT-UserToken': '".$UserToken."'}";
$body = '{"device":{"capabilities":[{"protection":"WIDEVINE","container":"ISOBMFF","transport":"DASH","acodec":"AAC","vcodec":"H264"},{"protection":"NONE","container":"ISOBMFF","transport":"DASH","acodec":"AAC","vcodec":"H264"}],"maxVideoFormat":"HD","model":"PC","hdcpEnabled":true},"client":{"thirdParties":["FREEWHEEL","YOSPACE"]},"contentId":"GMO_00000000349178_01","providerVariantId":"1c8810f1-d0fb-3338-a39d-cc1f579186e1","parentalControlPin":null}';
function calculate_sky_header_md5($sky_headers) {
if(strlen($sky_headers) > 0 ) {
$headers = explode(",", str_replace(["{","}","'"],["","",""],$sky_headers));
foreach($headers as $header) {
$header = explode(":",$header);
$h[] = strtolower(str_replace(" ","",$header[0])).":".$header[1];
}
return md5(implode("\n",$h)."\n");
} else {
return "{}";
}
}
$data = strtoupper($method."\n").$url."\n"."\n".$NBCU."\n1.0\n".calculate_sky_header_md5($sky_headers)."\n".$time."\n".md5($body)."\n";
$hash = base64_encode(hash_hmac("sha1", $data, $hmac_key, $raw_output=TRUE));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ovp.peacocktv.com/video/playouts/vod");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$headers = array();
$headers[] = 'x-skyott-agent: nbcuott.tablet.android';
$headers[] = 'x-skyott-provider: NBCU';
$headers[] = 'x-skyott-territory: US';
$headers[] = 'x-skyott-pinoverride: false';
$headers[] = 'x-SkyOTT-UserToken: '.$UserToken;
$headers[] = 'x-sky-signature: SkyOTT client="'.$NBCU.'",signature="'.$hash.'",timestamp="'.$time.'",version="1.0"';
$headers[] = 'x-skyott-pinoverride: false';
$headers[] = 'Content-Type: application/vnd.playvod.v1+json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$item = json_decode(curl_exec($ch),true);
print_r($item);