|
发表于 2024-9-13 08:49:19
|
显示全部楼层
#在这里快速<?php error_reporting(0); $id = $_GET['id']??'cctv1'; $q = $_GET['q']??'1';//1,蓝光;4,超清;8,高清 $n = [ 'cctv1' => ['11200132825562653886','6a67896c58b70dbd5e7fd8c72a6c7c4c2e0d0387cc3e0e54800098ddc63f6b13','1722336050'],//CCTV1 'cctv2' => ['12030532124776958103','c8aef6175f57ba79f980859fdab0edf0294c844d6d8301be60b53acdc0a8414c','1722342782'],//CCTV2 'cctv4' => ['10620168294224708952','c758d0d025a6c1e42146da5c0d8d4cccac087c9b89c312abda8c6864806725cd','1722346903'],//CCTV4 'cctv13' => ['16265686808730585228','2aa6e6aab288e1e05ddf47ef8cd06dfcd29e747cd6b4f639e412225ff84bcad0','1722344582'],//CCTV13 ]; $url = "https://emas-api.cctvnews.cctv.com/h5/emas.feed.article.live.detail/1.0.0?articleId={$n[$id][0]}&scene_type=6"; $h = [ 'x-emas-gw-appkey: 20000009', 'x-emas-gw-pv: 6.1', 'x-emas-gw-sign:' .$n[$id][1], 'x-emas-gw-t:' .$n[$id][2], ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HTTPHEADER,$h); $data = curl_exec($ch); curl_close($ch); $response = json_decode(base64_decode(json_decode($data,1)['response']),1); $playurl = $response['data'] ['live_room']['liveCameraList'][0]['pullUrlList'][$q]['authResultUrl'][0]['authUrl']; header('location:'.$playurl); //print_r($playurl); ?>回复# |
|