|
- <?php
- $ids = array(
- "1"=>"yctv1",//盐城一套
- "2"=>"yctv2",//盐城二套
- "3"=>"yctv3",//盐城三套
- "5"=>"ycgb1",//fm91.5新闻广播
- "6"=>"ycgb2",//fm105.3经济生活广播
- "7"=>"ycgb3",//fm88.2农村广播
- "8"=>"ycgb4",//fm98.0盐城fm98.0
- );
- $id=$_GET["id"];
- $url="http://www.0515yc.cn/m2o/player/program_xml.php?channel_id=".$id;
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $re = curl_exec($ch);
- curl_close($ch);
- preg_match('|playlist(.*?)"|i',$re,$u);
- $m3u8="http://stream.0515yc.cn/".$ids[$id]."/playlist".$u[1];
- header('Location:'.$m3u8);
- ?>
复制代码 测试:
盐城一套,http://www.nettvplus.live/hls/yancheng.php?id=1
盐城二套,http://www.nettvplus.live/hls/yancheng.php?id=2
盐城三套,http://www.nettvplus.live/hls/yancheng.php?id=3
|
评分
-
查看全部评分
|