1
0
Fork 0
mirror of https://github.com/fernwerker/ownDynDNS.git synced 2025-07-09 21:55:13 +02:00

Add feature to update multiple subdomains, separated by comma

This commit is contained in:
theHaury 2023-04-23 23:07:30 +02:00 committed by GitHub
parent 1eb144d800
commit 8712f5458e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();
}