From 6ba71f78d175ff86017f202d2931bdee7d9ae8a6 Mon Sep 17 00:00:00 2001 From: devdatt Date: Sat, 27 Dec 2025 16:18:34 +0530 Subject: [PATCH] print_r --- encoder/firewall.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/encoder/firewall.php b/encoder/firewall.php index c6c1000..de5c407 100644 --- a/encoder/firewall.php +++ b/encoder/firewall.php @@ -12,6 +12,7 @@ $defaults = [ ]; $data = $defaults; + if (is_file($jsonFile)) { $stored = json_decode(file_get_contents($jsonFile), true); if (is_array($stored)) { @@ -43,6 +44,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { foreach ($data as $port => $value) { $tmp = explode(",", trim($value)); if (count($tmp) > 0) { + error_log(count($tmp)); + print_r($tmp); foreach ($tmp as $ip) { error_log("limit port " . $port); exec("sudo ufw allow from " . $ip . "to any port " . $port . " proto tcp");