Update functions.php

pull/37/head
david082321 2 years ago committed by GitHub
parent ca71833c9e
commit 4cf564b6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -141,6 +141,7 @@ function get_userinfo() {
function check_412($output,$get_area) {
if (TG_NOTIFY == 1) {
$status = json_decode($output, true);
$msg = "";
if (SAVE_CACHE == 0) {
if ($status['code'] == -412) {
$msg = '破服务器412啦地区:'.$get_area;
@ -159,10 +160,12 @@ function check_412($output,$get_area) {
}
}
}
try {
file_get_contents(TG_BOT_API.'/bot'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text='.$msg);
} catch (Exception $e) {
// 不做任何事
if ($msg != "") {
try {
file_get_contents(TG_BOT_API.'/bot'.TG_BOT_KEY.'/sendMessage?chat_id='.TG_CHAT_ID.'&text='.$msg);
} catch (Exception $e) {
// 不做任何事
}
}
}
}

Loading…
Cancel
Save