Update sendmessage.php

This commit is contained in:
jakani24
2024-03-12 15:32:05 +01:00
parent 402fd62330
commit 471c93ff6d

View File

@@ -3,6 +3,12 @@
//exec('run_baby_run > /dev/null &'); //exec('run_baby_run > /dev/null &');
function send($message){ function send($message){
include "../../../config.php";
$conn = new mysqli($DB_SERVERNAME, $DB_USERNAME, $DB_PASSWORD,$DB_DATABASE);
if ($conn->connect_error) {
$success=0;
die("Connection failed: " . $conn->connect_error);
}
//get apikey of telegram bot //get apikey of telegram bot
$sql = "SELECT * FROM settings WHERE name = 'telegram_bot'"; $sql = "SELECT * FROM settings WHERE name = 'telegram_bot'";
$stmt = $conn->prepare($sql); $stmt = $conn->prepare($sql);