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:
parent
1eb144d800
commit
8712f5458e
1 changed files with 14 additions and 1 deletions
15
update.php
15
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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue