乐视云发行(LeVrp)

2017-6-26 admin Code

<?php
/**
 * 乐视云发行
 *
 * 
 * @author     apiicc<http://>
 * @version    1.0
 * @data       2017-04-29 20:57:02
 *
 *
 * 严重警告:
 * 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);
}
 
if( empty($ui['vu']) || !is_numeric($ui['vu']) || empty($ui['uu']) || !is_numeric($ui['uu']) ){
    die('Please attach relevant parameters!');
}
 
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){
    $p = array(
        "uu" => $uuid,
        "vu" => $vuid,
        "cf" => "flash",
        "format" => "json",
        "ran" => time(),
        "pet" => "0",
        "pver" => "VodPC_v4.8.3",
        "ver" => "1.0",
        "pu" => "6",
        "p" => "120",
        "pageurl" => "http://vrp.lecloud.com/cp/content/contentManager"
    );
    $d = '';
    ksort($p);
    foreach($p as $k => $v){
        $d .= $v;
    }
    $sign = md5($d.'04c5e1e616f668bc559af2afa98b9a25'.md5('flash04c5e1e616f668bc559af2afa98b9a25'.$vuid));
    $in = json_decode(https_curl("http://api.mms.lecloud.com/v2/mms/play?".http_build_query($p)."&sign={$sign}"),true);
    
    foreach( $in['data']['videoinfo']['medialist'] as $i=>$row ){
        foreach( $row['urllist'] as $l=>$value ){
            $f['mp4'][$row['definition']] = $value['url']."&tss=no&ctv=pc&m3v=1&termid=1&format=0&hwtype=un&ostype=macos";
            $f['m3u8'][$row['definition']] = $value['url']."&tss=ios&ctv=pc&m3v=1&termid=1&format=0&hwtype=un&ostype=macos";
        }
    }
    
    $data = array(
        'title' => $in['data']['videoinfo']['name'],
        'video' => $f,
    );
    
    if( !$in['message'] ){
        $printr = array('status' => '200', 'msg' => 'success', 'data' => $data);
    }else{
        $printr = array('status' => '1001', 'msg' => 'ㄟ( ▔, ▔ )ㄏ,数据出错了哟!');
    }
    
    return json_encode($printr);
}
 
print_r( lecloud($ui['uu'],$ui['vu']) );

标签: 乐视 乐视云 LeVrp

发表评论:

Powered by emlog