Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
v3.0.1
Browse files Browse the repository at this point in the history
v3.0.1
1. 修复 config.php 报错问题
2. 拆分 config.php ,用户传入参数改为 process.php 处理
  • Loading branch information
david082321 committed Apr 18, 2021
1 parent f76f693 commit cf7d01a
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 41 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

## 下载:

* [下载(GitHub) v3.0.0](https://github.com/david082321/BiliRoaming-PHP-Server/raw/main/Server_v3.0.0.zip)
* [下载(GitHub) v3.0.1](https://github.com/david082321/BiliRoaming-PHP-Server/releases/download/v3.0.1/Server_v3.0.1.zip)

* [下载历史版本](https://github.com/david082321/BiliRoaming-PHP-Server/releases)

* !!!重要!!!由于网页脚本的更新,为作缓存区分,v3.0.0 更新了数据库字段。从 1.x 或 2.x 升级的用户,请务必更新数据库。

Expand Down Expand Up @@ -123,12 +125,14 @@

├─cache.sql (导入MySQL用的)[仅缓存使用]

├─config.php (用户设置)
├─config.php (设置本程序各种参数)

├─index.php (接受上面index.php) <──主要入口在这里

├─log.php (缓存用户)[仅缓存使用]

├─process.php (处理用户传入参数)

├─replace.php (替换视频)

├─sign.php (重签名)[未公开源码]
Expand Down
Binary file added Server_v3.0.1.zip
Binary file not shown.
45 changes: 7 additions & 38 deletions config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
// 防止外部破解
if(!defined('SYSTEM')) {exit(BLOCK_RETURN);} // 防止外部破解,此行勿改


// 封锁
define('BLOCK_TYPE','blacklist'); // 封锁类型:blacklist 黑名单, whitelist 本地白名单, 不是填写前面两个就是不封锁
define('REPLACE_TYPE', 'tom'); // 是否替换视频(仅黑/白名单时生效)。hlw 葫芦娃, tom 猫和老鼠, xyy 喜羊羊, all 随机
Expand Down Expand Up @@ -67,46 +71,11 @@
$hosts=array('workers.dev','workers.dev');

// 其他
define('WELCOME', 'Success!'); //首页欢迎语
define('WELCOME', "Success!<br>Power by BiliRoaming-PHP-Server. Ver".VERSION); //首页欢迎语
define('BLOCK_RETURN', '{"code":-10403,"message":"抱歉您已被封锁"}'); //封锁返回内容

// 参数,不懂就别改
// 这个参数,不懂就别改
define('APPKEY', '1d8b6e7d45233436');
define('APPSEC', '560c52ccd288fed045859ed18bffd973');
define('ACCESS_KEY', @$_GET['access_key']);
define('CID', @$_GET['cid']);
define('EP_ID', @$_GET['ep_id']);
define('SS_ID', @$_GET['season_id']);
define('BILIROAMING_VERSION', @$_SERVER['HTTP_X_FROM_BILIROAMING']);
if (BILIROAMING_VERSION == '') {
if (BILIROAMING == 1 && WEB_ON == 0) { //仅限漫游用户,且未开放web脚本
exit(BLOCK_RETURN);
}else if (@$_GET['area'] == '' || @$_GET['area'] == 'false') { //web脚本
define('AREA', 'noarea');
}
}else if (@$_GET['area'] == '') { //适配老漫游版本
define('AREA', 'oldversion');
}else{
define('AREA', @$_GET['area']);
}
if (@$_GET['ts'] == '') {
define('TS', time());
}else{
define('TS', @$_GET['ts']);
}
$baned = 0;
if (in_array(EP_ID, $epid_list) && BAN_EP == 1) {
$baned = 1;
}
if (in_array(CID, $cid_list) && BAN_CID == 1) {
$baned = 1;
}
if (in_array(AREA, $BAN_SERVER_AREA)) {
$baned = 1;
exit(BLOCK_RETURN);
}
// 防止外部破解
if(!defined('SYSTEM')) {
exit(BLOCK_RETURN);
}

?>
4 changes: 3 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php
// 防止外部破解
define('SYSTEM', TRUE);
define('VERSION', '3.0.0');
define('VERSION', '3.0.1');
// 加载配置
include ("config.php");
// 处理用户传入参数
include ("process.php");
// 加上json的Header
header('Content-Type: application/json; charset=utf-8');
// 加上web的Header
Expand Down
40 changes: 40 additions & 0 deletions process.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
// 防止外部破解
if(!defined('SYSTEM')) {exit(BLOCK_RETURN);}

define('ACCESS_KEY', @$_GET['access_key']);
define('CID', @$_GET['cid']);
define('EP_ID', @$_GET['ep_id']);
define('SS_ID', @$_GET['season_id']);
define('BILIROAMING_VERSION', @$_SERVER['HTTP_X_FROM_BILIROAMING']);
if (BILIROAMING_VERSION == '') {
if (BILIROAMING == 1 && WEB_ON == 0) { //仅限漫游用户,且未开放web脚本
exit(BLOCK_RETURN);
} else if (@$_GET['area'] == '' || @$_GET['area'] == 'false') { //web脚本
define('AREA', 'noarea');
} else {
define('AREA', @$_GET['area']);
}
} else if (@$_GET['area'] == '') { //适配老漫游版本
define('AREA', 'oldversion');
} else {
define('AREA', @$_GET['area']);
}
if (@$_GET['ts'] == '') {
define('TS', time());
}else{
define('TS', @$_GET['ts']);
}
$baned = 0;
if (in_array(EP_ID, $epid_list) && BAN_EP == 1) {
$baned = 1;
}
if (in_array(CID, $cid_list) && BAN_CID == 1) {
$baned = 1;
}
if (in_array(AREA, $BAN_SERVER_AREA)) {
$baned = 1;
exit(BLOCK_RETURN);
}

?>

0 comments on commit cf7d01a

Please sign in to comment.