diff --git a/intl/gateway/v2/app/subtitle/index.php b/intl/gateway/v2/app/subtitle/index.php index a53347d..9e780ba 100644 --- a/intl/gateway/v2/app/subtitle/index.php +++ b/intl/gateway/v2/app/subtitle/index.php @@ -17,10 +17,7 @@ include (ROOT_PATH."utils/process.php"); $host = CUSTOM_HOST_TH_SUB; // 锁区、web接口、X-From-Biliroaming //// (无) -// 鉴权、替换access_key、获取缓存 -if ($baned == 1) { - block(); -} +// 获取缓存 if (SAVE_CACHE == 1) { get_cache_subtitle(); // 获取缓存 } diff --git a/intl/gateway/v2/ogv/view/app/episode/index.php b/intl/gateway/v2/ogv/view/app/episode/index.php index 970cbf0..f43caf2 100644 --- a/intl/gateway/v2/ogv/view/app/episode/index.php +++ b/intl/gateway/v2/ogv/view/app/episode/index.php @@ -14,10 +14,6 @@ include (ROOT_PATH."utils/process.php"); $host = CUSTOM_HOST_TH; // 锁区、web接口、X-From-Biliroaming include (ROOT_PATH."utils/lock_area.php"); -// 鉴权、替换access_key、获取缓存 -if ($baned == 1) { - block(); -} // 指定ip回源 if (IP_RESOLVE == 1) { $host = $hosts[array_rand($hosts)]; diff --git a/intl/gateway/v2/ogv/view/app/season/index.php b/intl/gateway/v2/ogv/view/app/season/index.php index c348785..ce26c28 100644 --- a/intl/gateway/v2/ogv/view/app/season/index.php +++ b/intl/gateway/v2/ogv/view/app/season/index.php @@ -17,10 +17,7 @@ include (ROOT_PATH."utils/process.php"); $host = CUSTOM_HOST_TH; // 锁区、web接口、X-From-Biliroaming include (ROOT_PATH."utils/lock_area.php"); -// 鉴权、替换access_key、获取缓存 -if ($baned == 1) { - block(); -} +// 获取缓存 if (SAVE_CACHE == 1) { get_cache_season(); // 获取缓存 } diff --git a/intl/gateway/v2/ogv/view/app/season2/index.php b/intl/gateway/v2/ogv/view/app/season2/index.php index 1e5f211..8dcf8a0 100644 --- a/intl/gateway/v2/ogv/view/app/season2/index.php +++ b/intl/gateway/v2/ogv/view/app/season2/index.php @@ -17,10 +17,7 @@ include (ROOT_PATH."utils/process.php"); $host = CUSTOM_HOST_TH; // 锁区、web接口、X-From-Biliroaming include (ROOT_PATH."utils/lock_area.php"); -// 鉴权、替换access_key、获取缓存 -if ($baned == 1) { - block(); -} +// 获取缓存 if (SAVE_CACHE == 1) { get_cache_season(); // 获取缓存 } diff --git a/intl/gateway/web/v2/subtitle/index.php b/intl/gateway/web/v2/subtitle/index.php index e046e83..119d5cc 100644 --- a/intl/gateway/web/v2/subtitle/index.php +++ b/intl/gateway/web/v2/subtitle/index.php @@ -17,10 +17,7 @@ include (ROOT_PATH."utils/process.php"); $host = CUSTOM_HOST_TH_WEBSUB; // 锁区、web接口、X-From-Biliroaming //// (无) -// 鉴权、替换access_key、获取缓存 -if ($baned == 1) { - block(); -} +// 获取缓存 if (SAVE_CACHE == 1) { get_cache_subtitle(); // 获取缓存 } diff --git a/utils/auth.php b/utils/auth.php index 1d21e34..93e236f 100644 --- a/utils/auth.php +++ b/utils/auth.php @@ -86,6 +86,7 @@ if (ACCESS_KEY != "") { // access_key 存在 } } $is_baned = false; + $baned = 0; switch (BLOCK_TYPE) { case "blacklist": // 在线黑名单 if ($is_blacklist) { diff --git a/utils/functions_cache.php b/utils/functions_cache.php index 83adabb..e3677fa 100644 --- a/utils/functions_cache.php +++ b/utils/functions_cache.php @@ -576,7 +576,7 @@ function read_status($area){ $sqlco = "SELECT `code` FROM `status_code` WHERE `area` = '".$area."'"; $result = $dbh -> query($sqlco); $code = $result -> fetch(); - if ($code == false) { + if (!$code) { return 0; } return $code['code']; @@ -593,7 +593,6 @@ function write_status($code, $area) { //判断表是否存在 if ( count($row) == '1' ) { $sql = "UPDATE `status_code` SET `time` = '".time()."', `code` = '".$code."' WHERE `area` = '".$area."';"; - $dbh -> exec($sql); } else { $sql = "CREATE TABLE status_code ( id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, @@ -609,8 +608,8 @@ function write_status($code, $area) { $sql = "INSERT INTO `status_code` (`area`,`code`,`time`) VALUES ('tw','".$code."','".time()."')"; $dbh -> exec($sql); $sql = "INSERT INTO `status_code` (`area`,`code`,`time`) VALUES ('th','".$code."','".time()."')"; - $dbh -> exec($sql); } + $dbh -> exec($sql); } // 写入日志 diff --git a/utils/process.php b/utils/process.php index c7f7667..8850c49 100644 --- a/utils/process.php +++ b/utils/process.php @@ -52,7 +52,6 @@ define('SS_ID', @$_GET['season_id']); define('QN', @$_GET['qn']); define('BILIROAMING_VERSION', @$_SERVER['HTTP_X_FROM_BILIROAMING']); define('BILIROAMING_VERSION_CODE', @$_SERVER['HTTP_BUILD']); -$baned = 0; $th_paths = array("/intl/gateway/v2/app/search/type", "/intl/gateway/v2/app/search/v2", "/intl/gateway/v2/app/subtitle", "/intl/gateway/web/v2/subtitle", "/intl/gateway/v2/ogv/view/app/season", "/intl/gateway/v2/ogv/view/app/season2", "/intl/gateway/v2/ogv/playurl", "/intl/gateway/v2/ogv/view/app/episode"); $get_area = @$_GET['area']; if (BILIROAMING_VERSION == '' && BILIROAMING_VERSION_CODE == '') { diff --git a/utils/redis-class.php b/utils/redis-class.php index b9d7809..5fb8573 100644 --- a/utils/redis-class.php +++ b/utils/redis-class.php @@ -94,5 +94,6 @@ } return $ttl; } - }; + } + ?> diff --git a/utils/version.php b/utils/version.php index 0e18cb7..92a73a6 100644 --- a/utils/version.php +++ b/utils/version.php @@ -2,7 +2,7 @@ // 防止外部破解 if(!defined('SYSTEM')) {exit();} // 防止外部破解,此行勿改 -define('VERSION', '4.5.1'); +const VERSION = '4.5.1'; // 加上json的Header header('Content-Type: application/json; charset=utf-8'); // 加上web的Header