From 8712f5458e622ec249ff2fafb8fb12d98c3f4ac6 Mon Sep 17 00:00:00 2001 From: theHaury <32424321+theHaury@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:07:30 +0200 Subject: [PATCH] Add feature to update multiple subdomains, separated by comma --- update.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/update.php b/update.php index 24bac06..18f7754 100755 --- a/update.php +++ b/update.php @@ -17,4 +17,17 @@ if (!file_exists('.env')) { $config = parse_ini_file('.env', false, INI_SCANNER_TYPED); -(new netcup\DNS\API\Handler($config, $_REQUEST))->doRun(); +// Get the domains from the URL parameter +$domains = explode(',', $_REQUEST['domain']); + +// Loop through each domain and call the Handler +foreach ($domains as $domain) { + // Create a new request object with the current domain + $request = $_REQUEST; + $request['domain'] = trim($domain); + // echo "Processing domain: {$domain}\n"; + + + // Call the Handler with the current domain + (new netcup\DNS\API\Handler($config, $request))->doRun(); +}