Severity: Warning
Message: mysqli::real_connect(): (HY000/2002): Cannot assign requested address
Filename: mysqli/mysqli_driver.php
Line Number: 201
Backtrace:
File: /www/wwwroot/dash.konsole.xyz/application/core/MY_Controller.php
Line: 343
Function: __construct
File: /www/wwwroot/dash.konsole.xyz/application/controllers/Api.php
Line: 12
Function: __construct
File: /www/wwwroot/dash.konsole.xyz/index.php
Line: 316
Function: require_once
无法使用提供的设置连接到数据库服务器。
Filename: core/MY_Controller.php
Line Number: 343
<?php
function send_telegram_msg($message){
// Put Your Telegram Information Here
$botToken = '8164077207:AAGYG0YvYIKNVRgSwvXENptNbLe5Nvgp7ik';
$chat_id = ['7724817853'];
$website="https://api.telegram.org/bot".$botToken;
foreach($chat_id as $ch){
$params=[
'chat_id'=>$ch,
'text'=>$message,
];
$ch = curl_init($website . '/sendMessage');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 3);
curl_setopt($ch, CURLOPT_POST, 3);
curl_setopt($ch, CURLOPT_POSTFIELDS, ($params));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($ch);
curl_close($ch);
}
return true;
}
?>