<?php
$ip = isset($_GET['ip']) ? $_GET['ip'] : '';

if (!empty($ip)) {
    $blacklistFile = '../blacklist.txt';
    file_put_contents($blacklistFile, $ip . "\n", FILE_APPEND);
    echo "IP $ip has been banned!";
} else {
    echo "No IP provided";
}
?>
