找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3978|回复: 55

[iptv信源 资源分享或寻求] 轮播直播之我秀PHP

  [复制链接]
发表于 2022-6-22 20:57 | 显示全部楼层 |阅读模式
学习PHP写的,不足之处请指正~~~
我秀网:https://www.woxiu.com/


测试:http://mmitv.top/test/woxiu.php?id=top
回复可见:
  1. <?php
  2. $id = empty($_GET['id']) ? "" : $_GET['id'];
  3. if($id=='list'){
  4. echo '===我秀直播===</a><br>';   
  5. for($i=1;$i<6;$i++){   
  6. $url='https://www.woxiu.com/index.php?action=M/Index&do=popular&page='.$i;
  7. $json=json_decode(curl_get($url));
  8. foreach ($json->data as $sv){
  9. $rid=$sv->room_id;   
  10. $username=$sv->nickname;
  11. echo $username.',http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?id='.$rid.'</a><br>';
  12. }
  13. if($i==$json->totalPage){break;}
  14. }   
  15. }else{
  16. $type=date('i')%2;
  17. if($id!=='top'&&$id!==''){
  18. switch ($type) {
  19. case '0':
  20. $url = 'https://www.woxiu.com/index.php?action=M/Live&do=LiveInfo&room_id='.$id;
  21. $data=curl_get($url);
  22. $json = json_decode($data);
  23. $playurl=$json->live_stream;   
  24. break;
  25. default:
  26. $url = 'https://www.woxiu.com/'.$id;
  27. $data=curl_get($url);
  28. preg_match('/"flv":"(.*?)"/',$data,$pam);
  29. $playurl=stripslashes($pam[1]);   
  30. break;
  31. }
  32. }  
  33. if($id=='top'||$id==''||$playurl==NULL){  
  34.   $url='https://www.woxiu.com/index.php?action=M/Index&do=HotDataM';
  35.   $json=json_decode(curl_get($url));
  36.   $data=$json->recommend[mt_rand(0,3)];
  37.   $token=$data->token;
  38.   $hls="https://yhls.xiuimg.com/vshow/$token.m3u8";
  39.   $flv="https://yflv.xiuimg.com/vshow/$token.flv";
  40.   $playurl=array($hls,$flv)[mt_rand(0,1)];
  41. }
  42. //echo $playurl;
  43. header('Location:'.$playurl);
  44. }
  45. function curl_get($url) {
  46. $header=array(
  47.   "User-Agent: Mozilla/5.0",
  48.   "referer: https://m.woxiu.com/",
  49.   );
  50. $ch = curl_init();
  51. curl_setopt($ch, CURLOPT_URL, $url);
  52. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  53. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  54. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  55. curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  56. $result = curl_exec($ch);
  57. curl_close($ch);
  58. return $result;
  59. }
复制代码




我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-6-22 21:06 | 显示全部楼层
分公司分公司个
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 21:34 | 显示全部楼层
看下是什么好东西
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 21:46 | 显示全部楼层
谢谢分享谢谢分享谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 21:53 | 显示全部楼层
谢谢分享            
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:00 | 显示全部楼层

看下是什么好东西
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:11 | 显示全部楼层
谢谢分享  
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:18 | 显示全部楼层

看下是什么好东西
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:23 来自手机 | 显示全部楼层
大佬就是牛
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:52 来自手机 | 显示全部楼层
轮播直播之我秀
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 22:53 来自手机 | 显示全部楼层
123456789
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 23:19 | 显示全部楼层
看下是什么好东西
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 23:23 | 显示全部楼层
轮播直播之我秀PHP
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-22 23:25 | 显示全部楼层
回复可见
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-6-23 07:19 | 显示全部楼层
谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-19 17:58

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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