Error message: $err"; } // Remove the regex and any empty lines from the list $list = explode("\n", $list); $list = array_diff($list, array($_POST['domain'], "")); $list = implode("\n", $list); if(file_put_contents($regexfile, $list."\n") === FALSE) { $err = error_get_last()["message"]; echo "Unable to remove regex \"".htmlspecialchars($_POST['domain'])."\" from ${regexfile}
Error message: $err"; } else { // Send SIGHUP to pihole-FTL using a frontend command // to force reloading of the regex domains // This will also wipe the resolver's cache echo exec("sudo pihole restartdns reload"); } break; } ?>