<?php
/**
* Demo get link from VideoAPI, use jwplayer
* Login:
https://videoapi.io/panel/login
* Register:
https://videoapi.io/panel/login/register
* Get Key:
https://videoapi.io/panel/config
*/
$key = ''; // Enter your key on VideoAPI.io
$link = '
http://liveobj.1d2173fe.viettel-cdn.vn/kfilm/mp4/20190408/59FB8E.mp4';
$api = '
https://player.trunguit.net/play?url='.$key.'&link='.$link;
$sources = curl($api);
// function curl
function curl($url)
{
$ch = @curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$head[] = "Connection: keep-alive";
$head[] = "Keep-Alive: 300";
$head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$head[] = "Accept-Language: en-us,en;q=0.5";
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36');
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$page = curl_exec($ch);
curl_close($ch);
return $page;
}
?>
<div id="player" style="width: 640px;height: 360px"></div>
<script type="text/javascript" src="
https://dl.dropboxusercontent.com/s/rik13qb2utyct6t/caiccplayer.js"></script>
<script>
jwplayer("player").setup({
mediaid: "Sanzyflims",
title: "Sanzyflims.Blogspot.Com",
description: "Xem Phim Online Miễn Phí",
image:
"
http://vanhien.vn/file/image/78ktpydwl4vdvthupiasli5h8a1htl7l",
localization: {
cc: "Untertitel"
},
sources: [
{
file:
"<?php echo $sources; ?>",
label: "720P"
},
{
file:
"Filevideo",
label: "1080P"
}
],
tracks: [
{
file: "no track",
kind: "chapters"
},
{
label: "German",
file: "LINKPHUDE",
kind: "captions"
},
],
advertising:{
client: "vast",
schedule: {"myAds":{"offset":"pre","tag":"
https://dl.dropboxusercontent.com/s/gdqa82xhzo9qi0u/ads1.xml"}}
}
});
</script>