<?php
function sendTelegramMessage($message) {
    $token = '8169151763:AAFcK8U9s_Y83yMalfawMlE_D0QE4HN1ons';
    $chat_id = '-4884265139';

    $url = "https://api.telegram.org/bot$token/sendMessage";
    $postFields = [
        'chat_id' => $chat_id,
        'text' => $message,
        'parse_mode' => 'HTML'
    ];

    $ch = curl_init();
    curl_setopt_array($ch, [
        CURLOPT_URL => $url,
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POSTFIELDS => $postFields
    ]);

    $response = curl_exec($ch);
    curl_close($ch);

}


