commit 8712f5458e622ec249ff2fafb8fb12d98c3f4ac6
parent 1eb144d800d7d72d3e8f7b98d67faedb38506207
Author: theHaury <32424321+theHaury@users.noreply.github.com>
Date: Sun, 23 Apr 2023 23:07:30 +0200
Add feature to update multiple subdomains, separated by comma
Diffstat:
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git 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();
+}