From e8c51ef5894a53e2c3a8d06c426bde2592d0d06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=A5=E7=BE=8A?= Date: Sun, 10 Mar 2024 16:08:05 +0800 Subject: [PATCH] Add files via upload --- PHP/huya.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PHP/huya.php b/PHP/huya.php index 535de80..1f47d78 100644 --- a/PHP/huya.php +++ b/PHP/huya.php @@ -116,27 +116,27 @@ if (array_key_exists("exceptionType", $realdata)) { if ($media == "flv") { switch ($cdn) { case $cdn: - $mediaurl = $realurl["flv"][$cdn]; + $mediaurl = str_replace("http://", "https://", $realurl["flv"][$cdn]); break; default: - $mediaurl = $realurl["flv"]["hwcdn"]; + $mediaurl = str_replace("http://", "https://", $realurl["flv"]["hwcdn"]); break; } } if ($media == "hls") { switch ($cdn) { case $cdn: - $mediaurl = $realurl["hls"][$cdn]; + $mediaurl = str_replace("http://", "https://", $realurl["hls"][$cdn]); break; default: - $mediaurl = $realurl["hls"]["hwcdn"]; + $mediaurl = str_replace("http://", "https://", $realurl["hls"]["hwcdn"]); break; } } header('location:' . $mediaurl); exit(); } elseif ($realdata["roomInfo"]["eLiveStatus"] == 3) { - header('location:' . "http:" . base64_decode($realdata["roomProfile"]["liveLineUrl"])); + header('location:' . "https:" . base64_decode($realdata["roomProfile"]["liveLineUrl"])); exit(); } else { header('location:' . $mediaurl);