扒拉出骨灰级YY轮播php
本帖最后由 yf1197565391 于 2024-11-23 19:19 编辑<?php
$rid = $_GET['id'];
$bstrURL = 'http://interface.yy.com/hls/new/get/'.$rid.'/'.$rid.'/1200?source=wapyy&callback=jsonp3';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $bstrURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0" );
curl_setopt($ch,CURLOPT_REFERER,'https://www.yy.com/);
$data = curl_exec($ch);
curl_close($ch);
$n = preg_match('/hls":"(.*?)"/',$data,$result);
header('location:'.$result);
?>
频道列表都没有,看不了啊! gzlpsycw 发表于 2024-11-23 19:11
频道列表都没有,看不了啊!
随便去www.yy.com找个频道不就有ID了么,,此字符被系统屏蔽帖子一大堆,非要人家把饭给你整好,是不是还要喂你 没有用看不了 <?php
($_GET['id']?? die('缺少必要的id参数')) && ($ch = curl_init('http://interface.yy.com/hls/new/get/'.$_GET['id'].'/'.$_GET['id'].'/1200?source=wapyy&callback=jsonp3')) && curl_setopt_array($ch, ) && ($data = curl_exec($ch) or die('cURL请求失败: '.curl_error($ch))) && preg_match('/hls":"(.*?)"/', $data, $result) && header('location: '.$result) && exit;
die('没有从返回数据中匹配到预期的hls相关内容');
?> 21行少 '
21. curl_setopt($ch,CURLOPT_REFERER,'https://www.yy.com/');
分辨率太低了
页:
[1]