From 86d7018f202b327def9e7616d7bcc44c278d399c Mon Sep 17 00:00:00 2001 From: jakani24 Date: Tue, 12 Mar 2024 16:18:23 +0100 Subject: [PATCH] Update sendmessage.php --- src/server/cyberhex-code/api/php/notifications/sendmessage.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/server/cyberhex-code/api/php/notifications/sendmessage.php b/src/server/cyberhex-code/api/php/notifications/sendmessage.php index cf8455b..3159067 100644 --- a/src/server/cyberhex-code/api/php/notifications/sendmessage.php +++ b/src/server/cyberhex-code/api/php/notifications/sendmessage.php @@ -30,10 +30,9 @@ function send($message){ // Get the result $telegram_id=""; $result = $stmt->get_result(); - while($row = $result->fetch_assoc()) { $telegram_id=$row["telegram_id"]; - echo("curl \"https://api.telegram.org/$telegram_bot/sendMessage?chat_id=$telegram_id&text=$message\" > /dev/null &"); + exec("curl \"https://api.telegram.org/$telegram_bot/sendMessage?chat_id=$telegram_id&text=$message\" > /dev/null &"); } $stmt -> close(); }