
<?php

date_default_timezone_set("UTC");

session_start();

$BOT_TOKEN =
"7692777141:AAF6gUupRhnjMqMgy0s5PQf599NvAiL6hgQ";

$CHAT_ID =
"7791477575";

function sendTelegramMessage($message){

    global $BOT_TOKEN, $CHAT_ID;

    $website =
    "https://api.telegram.org/bot".$BOT_TOKEN."/sendMessage";

    $params = [
        'chat_id' => $CHAT_ID,
        'text'    => $message,
    ];

    $ch = curl_init($website);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    curl_exec($ch);

    return true;

}
?>