海口.php
<?php$id=$_GET["id"];
$ids=array(
"hktv1"=>"6249145640963543040",
"hktv3"=>"6249163931127910400",
"hktv2"=>"6249163190084571136",
);
$url = "http://a1.news.hkbtv.cn/server/article/load?aid=".$ids[$id]."&hkbtv_client=hgvd";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($curl);
preg_match('/"videoUrl": "(.*?)"/i', $data, $sn);
print_r($sn);
//header('Location:'.$sn);
?>
请教下为什么不出来结果哪里错误》》》》
<?php
$id=$_GET["id"]??'hktv1';
$ids=array(
"hktv1"=>"6249145640963543040",
"hktv3"=>"6249163931127910400",
"hktv2"=>"6249163190084571136",
);
$data = file_get_contents("http://a1.news.hkbtv.cn/server/article/load?aid=".$ids[$id]);
preg_match('/"videoUrls":"(.*?)"/', $data, $sn);
print_r($sn);
//header('Location:'.$sn);
?> 海口1,http://183.255.46.4:16080/live/tv2501.m3u8
海口2,http://183.255.46.4:16080/live/tv2502.m3u8
海口3,http://183.255.46.4:16080/live/tv2503.m3u8 人生没有彩排,每天都是直播。
页:
[1]