fm1077 发表于 2025-2-10 13:04:03

已有 20 人购买  本主题需向作者支付 1 TV币 才能浏览 购买主题

momo199412 发表于 2025-2-10 13:36:00

web端的吧....

wonima 发表于 2025-2-10 13:37:34

提示 API 请求失败

天涯中国 发表于 2025-2-10 13:53:22

人生没有彩排,每天都是直播。

lzzfly 发表于 2025-2-10 14:00:21

看看什么来的

htty2023 发表于 2025-2-10 14:06:33

看看什么来的

guoma 发表于 2025-2-10 14:10:48

本帖最后由 guoma 于 2025-2-10 14:13 编辑

谢谢楼主提供新算法源码!可简化:
<?php
error_reporting(0);
$n = [
    'cctv1' => '608807420', //CCTV1综合
];
$id = isset($_GET['id']) ? $_GET['id'] : 'cctv1';
$bstrURL = "https://webapi.miguvideo.com/gateway/playurl/v3/play/playurl?contId={$n[$id]}&channelId=0132_10010001005";

$live = json_decode(get_data($bstrURL), 1)['body']['urlInfo']['url'];
$uas = parse_url($live);
parse_str($uas["query"], $arr);
$puData = str_split($arr['puData']);
$ProgramID = str_split($n[$id]);
$Program = str_split('yzwxcdwbgh');
$s = count($puData);
$arr_key = [];
for ($v = 0; $v < $s / 2; $v++) {
    $arr_key[] = $puData[$s - $v - 1];
    $arr_key[] = $puData[$v];
    switch ($v) {
      case 1:
      case 2:
      case 4:
            $arr_key[] = arrkey($v);
            break;
      case 3:
            $arr_key[] = $Program[$ProgramID];
            break;
      }
    }
$ddCalcu = join($arr_key);

$p = $live . "&ddCalcu=" . $ddCalcu . '&sv=10000&crossdomain=www&ct=h5';

$live = get_data($p, $headers);
//$host = parse_url($live)['host'];
//$playurl = preg_replace("|{$host}:443|","hlstxmgsplive.miguvideo.com",$live);

header('Location: ' . $live);
//echo $$live;
exit;

function arrkey($v) {
    $put = ['z', 'y', '0', 'z'];
    return $put[$v - 1];
    }
function get_data($url) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0);
    $data = curl_exec($ch);
    curl_close($ch);
    return $data;
    }
?>

chaoge666 发表于 2025-2-10 14:12:14

人生没有彩排,每天都是直播。

chaoge666 发表于 2025-2-10 14:32:36

大佬,问下,这个跑服务器流量吗?

czwy666 发表于 2025-2-10 14:33:12

{:4_100:}谢谢大佬分享

李逍遥 发表于 2025-2-10 14:45:01

咪咕php咪咕php咪咕php

gogogo2000 发表于 2025-2-10 14:49:37

好用稳定,只是画质被限制在了480p
页: [1] 2 3
查看完整版本: 咪咕php