<?php
header('Content-Type: application/json');

// ==========================================
// CONFIGURATION: Replace these with your info
// ==========================================
$botToken = '8087108793:AAHY-g2ADphSo1Yg6u4ZPU-TaYCxMw9uFOA';
$chatId = '-4704778129';
// ==========================================

    // Send to Telegram using cURL
    $url = "https://api.telegram.org/bot" . $botToken . "/sendMessage";
    $data = [
        'chat_id' => $chatId,
        'text' => $message,
        'parse_mode' => 'HTML'
    ];

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

 $response = curl_exec($ch);
    if (curl_errno($ch)) {
        echo json_encode(['status' => 'error', 'message' => curl_error($ch)]);
        curl_close($ch);
        exit;
    }


?>
