乐视云解析源码
<?php /** * 乐视视频 * 严重警告: * 1、源码仅供学习交流使用。 * 2、禁止用于危害官方利益的行为。 * 3、禁止用于违反法律法规的行为。 * * */ error_reporting(0); header('Content-type: text/json;charset=utf-8'); $ui = array(); foreach($_GET as $key => $value){ $ui[$key] = trim($value); } function https_curl($url){ $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); return curl_exec($curl); } function lecloud($uuid,$vuid){ $sign = md5("cfflashformatjsonran".time()."uu{$uuid}ver2.2vu{$vuid}2f9d6924b33a165a6d8b5d3d42f4f987"); $v = json_decode(https_curl("api.letvcloud.com/gpc.php?cf=flash&format=json&ran=".time()."&uu={$uuid}&ver=2.2&vu={$vuid}&sign={$sign}"),true); $ltyp = array("low"=>"标清","high"=>"高清","super"=>"超清","yuanhua"=>"原画"); foreach( $v['data']['video_info']['media'] as $l=>$row ){ $f['mp4'][$ltyp[$l]] = base64_decode($row['play_url']['main_url']); $f['m3u8'][$ltyp[$l]] = str_replace("tss=no","tss=ios",base64_decode($row['play_url']['main_url'])); } $data = array( 'title' => $v['data']['video_info']['video_name'], 'video' => $f, ); if( $v['code']==0 ){ $printr = array('status' => '200', 'msg' => 'success', 'data' => $data); }else{ $printr = array('status' => '1001', 'msg' => 'ㄟ( ▔, ▔ )ㄏ,参数错误'); } return $printr; } $_loc1_ = $ui['data']; $_loc2_ = $ui['type'];//链接清晰度 $_loc0_ = $ui['format'];//输出格式 json or 直连 $dtype = $ui['dtype'];//直连格式 $_loc3_ = explode('|',$_loc1_); $uu = explode(":",$_loc3_[0])[1]; $vu = explode(":",$_loc3_[1])[1]; $_loc4_ = array( 'bq' => '标清', 'gq' => '高清', 'cq' => '超清', 'yh' => '原画', ); $_loc5_ = lecloud($uu,$vu); $_loc6_ = $_loc5_['data']; $_loc7_ = $_loc6_['video']; switch( $_loc0_ ){ case "json": if( $_loc5_['status'] == 200 ){ $data = array( 'title' => $_loc6_['title'], 'video' => array( 'mp4' => $_loc7_['mp4'][$_loc4_[$_loc2_]], 'm3u8' => $_loc7_['m3u8'][$_loc4_[$_loc2_]], ) ); $printr = $data; }else{ $printr = array('status' => '1001', 'msg' => 'ㄟ( ▔, ▔ )ㄏ,参数错误'); } print_r( json_encode($printr) ); exit; break; case "url": if( $dtype == 'mp4' ){ $printr = $_loc7_['mp4'][$_loc4_[$_loc2_]]; }elseif( $dtype == 'm3u8' ){ $printr = $_loc7_['m3u8'][$_loc4_[$_loc2_]]; }else{ $printr = null; } print_r( header("location:".$printr) ); exit; break; default: print_r(json_encode(array('status' => '1001', 'msg' => 'ㄟ( ▔, ▔ )ㄏ,参数错误'))); }参数说明:
type=影片清晰度
format=输出格式 json or url直连跳转
dtype=影片格式 mp4 或 m3u8
如果你觉得雨滴资源网对你有帮助的话,可以小小的打赏一下小站,用于维持本站的运营!
版权声明:雨滴资源网内容来源于互联网,如果有侵权内容、不妥之处,请第一时间联系我们删除。敬请谅解!
本文链接:乐视云解析源码 - https://www.yudzy.com/105.html
失效提示:此文更新于2018-9-11,如果文章内容或图片资源失效,请留言反馈,客服会及时处理,谢谢!