找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 4530|回复: 26

谁有能力完善贵州电视台官网代理

[复制链接]
发表于 2020-6-24 15:28 | 显示全部楼层 |阅读模式
本帖最后由 zzq1234567890 于 2020-6-24 16:23 编辑

我先把我的代码贴下来,其中prematch这部分实在无法理解。请高人修改吧
<?php
header( 'Content-Type:text/html;charset=utf-8 ');
//id=ch01 贵州卫视 2 贵州公共3 影视文艺4大众生活5 5频道 6科教 7移动数字

$id=$_GET['id'];

$ids = array(
            "ws"=>"ch01",
            "gg"=>"ch02",
            "ys"=>"ch03",
            "sh"=>"ch04",
            "5"=>"ch05",
             "kj"=>"ch06",
            "yd"=>"ch07",            
        );


$url="https://api.gzstv.com/v1/tv/$ids[$id]/?remote_address=&fields=description,title,stream_url,image,author";
$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; Android 8.1.0; JKM-AL00b) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36):');
    $re = curl_exec($ch);
    curl_close($ch);
   //print $re;
//preg_match(' stream_url="(.*?)" />|',$re,$v);(需要修改 preg_match() 运行结果    {"title":"大众生活频道","image":"https://mstatic.gzstv.com/media/streams/images/2020/06/01/fFoay2GmyRkI.jpg","description":"<p>大众生活频道</p>","author":"leen","stream_url":"https://hls-qnlo-live.gzstv.com/livegztv-lo/CH04_lo.m3u8?s=3f85c87d64c5e6b866b7de313dd26b6f&ts=5ef2f820"}           )

print_r($v[1]);

preg_match('|stream_url":"(.*?)"}|',$re,$v)
header('Location:'.$v[1]);
?>


我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-6-24 15:47 | 显示全部楼层
preg_match('|stream_url":"(.*?)"}|',$re,$v)
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-6-24 16:18 | 显示全部楼层
移动数字 id是13
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-6-24 16:44 | 显示全部楼层
<?php
//id=ch01 贵州卫视 2 贵州公共3 影视文艺4大众生活5 5频道 6科教 7移动数字
$id=isset($_GET['id'])?$_GET['id']:"ws";
$ids = array(
            "ws"=>"ch01",
            "gg"=>"ch02",
            "ys"=>"ch03",
            "sh"=>"ch04",
            "5"=>"ch05",
             "kj"=>"ch06",
            "yd"=>"ch07",            
        );
$re = file_get_contents($url="https://api.gzstv.com/v1/tv/".$ids[$id]."/?remote_address=&fields=title,stream_url");
$playurl = json_decode($re,true)['stream_url'];
$playurl = str_replace("https", "http", $playurl);
header('Location:'.$playurl);
?>
返回的json不用正则更好
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-6-24 17:00 | 显示全部楼层
把preg_match('|stream_url":"(.*?)"}|',$re,$v)这句换成我这句就可以了!注意编码preg_match('/"stream_url":"(.*?)"/',$re, $v);
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-6-24 17:28 | 显示全部楼层
本帖最后由 zzq1234567890 于 2020-6-24 17:29 编辑
shanwoxing 发表于 2020-6-24 17:00
把preg_match('|stream_url":"(.*?)"}|',$re,$v)这句换成我这句就可以了!注意编码preg_match('/"stream_ur ...

多谢了,这个preg——match感觉慢慢理解了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-6-24 19:35 | 显示全部楼层
shanwoxing 发表于 2020-6-24 17:00
把preg_match('|stream_url":"(.*?)"}|',$re,$v)这句换成我这句就可以了!注意编码preg_match('/"stream_ur ...

可以看。虽然不看就是想学习一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-6-24 21:14 来自手机 | 显示全部楼层
这么烂也带?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-6-25 01:17 | 显示全部楼层
本帖最后由 guoma 于 2020-6-25 01:20 编辑

https://api.gzstv.com/v1/tv/ch01/贵州经济 ch09
贵州移动 ch13

我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本站网友
本站网友  发表于 2020-6-25 03:00
本帖最后由 匿名 于 2021-3-21 02:52 编辑

可以看的 啊  我截个图给你看 你就知道了

回复

使用道具 举报

 楼主| 发表于 2020-6-25 12:49 | 显示全部楼层
知道,早就试过了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-7-3 18:26 | 显示全部楼层
shanwoxing 发表于 2020-6-24 17:00
把preg_match('|stream_url":"(.*?)"}|',$re,$v)这句换成我这句就可以了!注意编码preg_match('/"stream_ur ...

大神,这个怎么写
<?php
$id=$_GET['id'];
//$name=$_GET['name'];
$url="http://api.epg2.cibn.cc/v1/loopChannelList?epgId=1000";
$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; Android 8.1.0; JKM-AL00b) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36):');
    $re = curl_exec($ch);
    curl_close($ch);
preg_match('/"code":"$id","m3u8":"(.*?)","programList":null},/',$re, $v);//说明运行出现多个地址,无法赋予对应的{"id":4,"code":"JingPin","m3u8":"http://gqys.lbcl01.cibn.cc/hls/vCIBNJPYY/1800/vCIBNJPYY.m3u8?k=12a51493d4fbb95aab08ad761775504f&channel=xlmediawatch&t=1593746550&ttl=86400&type=3&videotype=loop","status":1,"mobileCopyright":0,"channelId":81,"channelName":"精品影院","logo":"http://img.cdn.cibn.cc/view/0","urlid":"p2p://p2p.ott.cibntv.net:9906/589d5ec10005b2a3aaa312eae98c2ed2.ts","onplay":null,"programId":null,"no":"1","priceType":2,"lookTime":360000,"channelType":0,"categoryId":2,"logoDisplay":1,"topDistance":0,"leftDistance":0,"realWidth":0,"realHeight":0,"programList":null},{"id":5,"code":"YouXi","m3u8":"http://gqys.lbcl01.cibn.cc/hls/vCIBNGWPD/1800/vCIBNGWPD.m3u8?k=12a51493d4fbb95aab08ad761775504f&channel=xlmediawatch&t=1593746550&ttl=86400&type=3&videotype=loop","status":1,"mobileCopyright":1,"channelId":94,"channelName":"生活","logo":"http://img.cdn.cibn.cc/view/0","urlid":"p2p://p2p.ott.cibntv.net:9906/589d5a510001b9fdaa91bc651404ea58.ts",
print_r($v[1]);
header('Location:'.$v[1]);
?>
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-7-3 22:21 | 显示全部楼层

<?php
//CIBN高清影视,cibn.php?code=JingPin
$code=$_GET["code"];
$url="http://api.epg2.cibn.cc/v1/loopChannelList?epgId=1000";
$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Linux; Android 8.1.0; JKM-AL00b) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36):');
    $re = curl_exec($ch);
    curl_close($ch);
        preg_match('/"m3u8":"(.*?)","status":1,/',$re, $v);/*  说明运行出现多个地址,无法赋予对应的{"id":4,"code":"JingPin","m3u8":"http://gqys.lbcl01.cibn.cc/hls/vCIBNJPYY/1800/vCIBNJPYY.m3u8?k=12a51493d4fbb95aab08ad761775504f&channel=xlmediawatch&t=1593746550&ttl=86400&type=3&videotype=loop","status":1,"mobileCopyright":0,"channelId":81,"channelName":"精品影院","logo":"http://img.cdn.cibn.cc/view/0","urlid":"p2p://p2p.ott.cibntv.net:9906/589d5ec10005b2a3aaa312eae98c2ed2.ts","onplay":null,"programId":null,"no":"1","priceType":2,"lookTime":360000,"channelType":0,"categoryId":2,"logoDisplay":1,"topDistance":0,"leftDistance":0,"realWidth":0,"realHeight":0,"programList":null},{"id":5,"code":"YouXi","m3u8":"http://gqys.lbcl01.cibn.cc/hls/vCIBNGWPD/1800/vCIBNGWPD.m3u8?k=12a51493d4fbb95aab08ad761775504f&channel=xlmediawatch&t=1593746550&ttl=86400&type=3&videotype=loop","status":1,"mobileCopyright":1,"channelId":94,"channelName":"生活","logo":"http://img.cdn.cibn.cc/view/0","urlid":"p2p://p2p.ott.cibntv.net:9906/589d5a510001b9fdaa91bc651404ea58.ts",*/
    print_r($v[1]);
    header('Location:'.$v[1]);
?>

就这样子!有大连代理分享一下好吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-7-4 11:33 | 显示全部楼层

https://www.right.com.cn/forum/thread-4020970-1-98.html天途的就有,网站的等周一我看看能不能找到接口
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-7-4 11:39 | 显示全部楼层

点评

大神,我看了一下代码,属于js加密的,我目前没有代码。http://wap.dltv.cn/js/livestream_0112.js 这个就获得m3u8后缀。但是这个http://www.dltv.cn/js/livestream_0112.js 就只能flv格式了。 电视台编号可以调用h  详情 回复 发表于 2020-7-6 17:19
这是别人的代理,你有代理源码吗  详情 回复 发表于 2020-7-4 13:06
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-25 13:29

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表