Create action_ban-ip.php

This commit is contained in:
SubleXBle
2025-07-28 02:56:59 +02:00
committed by GitHub
parent 135a3d27e6
commit 6e1a4e29c6
+19
View File
@@ -0,0 +1,19 @@
<?php
// includes/actions/action_ban-ip.php
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
http_response_code(405); // Method Not Allowed
echo "Fehler: Nur POST erlaubt.";
exit;
}
$ip = $_POST['ip'] ?? null;
if (!$ip || !filter_var($ip, FILTER_VALIDATE_IP)) {
http_response_code(400); // Bad Request
echo "Ungültige oder fehlende IP.";
exit;
}
// Dummy-Antwort
echo "[BAN] IP $ip wurde erfolgreich verarbeitet.";