找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1545|回复: 5

[iptv信源 资源分享或寻求] 上海看看PHP

[复制链接]
发表于 2021-2-20 20:41 | 显示全部楼层 |阅读模式
初学php,欢迎批评指正
<?php
header("Content-type:text/html; Charset=utf-8");
$id = $_GET['id'];
function curl_get($headers, $url) {
    $ch = curl_init();
    #curl_setopt($ch, CURLOPT_HTTPHEADER,$headers);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36");
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_sEtopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
}
$url = "http://api.app.kankanews.com/kankan/v5/livePC/stream/live/?id=$id";
$response = curl_get($headers, $url);
$result=base64_decode($response);
preg_match('/"pcstream":"(.*?)","stime"/i',$result,$U);
$url = str_replace("\\","",$U[1]);
$M = substr(curl_get($headers, $url),59,);
$liveurl = "http:".$M;
header("Location: $liveurl");

评分

参与人数 1恩山币 +1 收起 理由
oreolee2020 + 1 感谢你的分享,无论怎样,你都是最无私的人!来,说说,你E盘上还有啥一起给我吧!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-2-20 21:02 | 显示全部楼层
ID呢????
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2021-2-20 21:55 | 显示全部楼层
上海东方卫视,id=800081
上海新闻综合,id=800084
上海外语频道,id=800089
上海都市频道,id=800090
纪实人文,id=800091
第一财*,id=800092
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-2-20 22:22 | 显示全部楼层
提示第20行不对 不能播放啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-2-21 08:02 | 显示全部楼层
不会玩hph
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-7-2 17:28 | 显示全部楼层
20行多了个 )
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-29 04:53

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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