添加412的通知 (#28) @M1saka10010

* add 412 Notification
pull/29/head
m1saka 3 years ago committed by GitHub
parent d270d05d4e
commit 6009a2d4a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -119,4 +119,9 @@ define('RESIGN_CN', 0); // 替换成大会员。0 否, 1 是
define('RESIGN_TH', 0); // 替换成泰国登录会员。0 否, 1 是
define('RESIGN_TH_PAID', 0); // 替换成泰国付费会员。0 否, 1 是
//telegram_bot 412提醒
define('TG_NOTIFY',0); // 是否开启TG提醒。 0 否 , 1 是
define('TG_BOT_KEY',''); // 找BotFather要
define('TG_CHAT_ID',''); // TG的chat_id具体怎么获取自行百度
define('TG_BOT_API','https://api.telegram.org'); // 服务器在国内可以自行反代
?>

@ -37,6 +37,13 @@ if (IP_RESOLVE == 1) {
} else {
$output = get_webpage($url);
}
// 412提醒
if (TG_NOTIFY == 1) {
$status = json_decode($output, true);
if ($status['code'] == -412) {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text=破服务器412啦地区:' . $get_area);
}
}
// 替换内容
include (ROOT_PATH."utils/replace.php");
// 返回内容给用户

@ -37,6 +37,13 @@ if (IP_RESOLVE == 1) {
} else {
$output = get_webpage($url);
}
// 412提醒
if (TG_NOTIFY == 1) {
$status = json_decode($output, true);
if ($status['code'] == -412) {
file_get_contents(TG_BOT_API.'/'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text=破服务器412啦地区:' . $get_area);
}
}
// 替换内容
include (ROOT_PATH."utils/replace.php");
// 返回内容给用户

Loading…
Cancel
Save