update cctv.php.
Signed-off-by: 红旗飘飘 <8504770+liu4331126@user.noreply.gitee.com>
This commit is contained in:
parent
b0afedbfda
commit
18c60c369d
18
cctv.php
18
cctv.php
|
@ -1,19 +1,23 @@
|
||||||
<?php
|
<?php
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
$id = $_GET['id']??'cctv1';
|
$id = $_GET['id']??'cctv2';
|
||||||
$q = $_GET['q']??'1';//1,蓝光;4,超清;8,高清
|
$q = $_GET['q']??'1';//1,蓝光;4,超清;8,高清
|
||||||
$n = [
|
$n = [
|
||||||
'cctv1' => ['11200132825562653886','6a67896c58b70dbd5e7fd8c72a6c7c4c2e0d0387cc3e0e54800098ddc63f6b13','1722336050'],//CCTV1
|
'cctv1' => ['11200132825562653886','0916dc838fce69425b9aed6d3e790f49'],//CCTV1
|
||||||
'cctv2' => ['12030532124776958103','c8aef6175f57ba79f980859fdab0edf0294c844d6d8301be60b53acdc0a8414c','1722342782'],//CCTV2
|
'cctv2' => ['12030532124776958103','102ebab86b52dcb7d437aa64cac55223'],//CCTV2
|
||||||
'cctv4' => ['10620168294224708952','c758d0d025a6c1e42146da5c0d8d4cccac087c9b89c312abda8c6864806725cd','1722346903'],//CCTV4
|
'cctv4' => ['10620168294224708952','bbb5af21098ef891310f3e95aca7eaa0'],//CCTV4
|
||||||
'cctv13' => ['16265686808730585228','2aa6e6aab288e1e05ddf47ef8cd06dfcd29e747cd6b4f639e412225ff84bcad0','1722344582'],//CCTV13
|
'cctv13' => ['16265686808730585228','563e1000aabda6bdda96248302d34051'],//CCTV13
|
||||||
];
|
];
|
||||||
|
$t = time();
|
||||||
|
$w = "&&&20000009&{$n[$id][1]}&{$t}&emas.feed.article.live.detail&1.0.0&&&&&";
|
||||||
|
$k = "emasgatewayh5";
|
||||||
|
$sign = hash_hmac('sha256', $w, $k);
|
||||||
$url = "https://emas-api.cctvnews.cctv.com/h5/emas.feed.article.live.detail/1.0.0?articleId={$n[$id][0]}&scene_type=6";
|
$url = "https://emas-api.cctvnews.cctv.com/h5/emas.feed.article.live.detail/1.0.0?articleId={$n[$id][0]}&scene_type=6";
|
||||||
$h = [
|
$h = [
|
||||||
'x-emas-gw-appkey: 20000009',
|
'x-emas-gw-appkey: 20000009',
|
||||||
'x-emas-gw-pv: 6.1',
|
'x-emas-gw-pv: 6.1',
|
||||||
'x-emas-gw-sign:' .$n[$id][1],
|
'x-emas-gw-sign:' .$sign,
|
||||||
'x-emas-gw-t:' .$n[$id][2],
|
'x-emas-gw-t:' .$t,
|
||||||
];
|
];
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
|
Loading…
Reference in New Issue