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 1/3] 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(); +} From 784bfcca2cf16aecdf812e6732f284f4c35a1029 Mon Sep 17 00:00:00 2001 From: Pascal Haury Date: Mon, 1 May 2023 12:29:29 +0200 Subject: [PATCH 2/3] remove debug echo --- update.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/update.php b/update.php index 18f7754..aab42c2 100755 --- a/update.php +++ b/update.php @@ -17,7 +17,7 @@ if (!file_exists('.env')) { $config = parse_ini_file('.env', false, INI_SCANNER_TYPED); -// Get the domains from the URL parameter +// Get the domains from the URL parameter and split them from the comma separated string $domains = explode(',', $_REQUEST['domain']); // Loop through each domain and call the Handler @@ -25,7 +25,6 @@ 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 From 44ba07dbfe778ecd8230e2fb37b3c9fcab92183c Mon Sep 17 00:00:00 2001 From: theHaury <32424321+theHaury@users.noreply.github.com> Date: Fri, 12 May 2023 21:10:01 +0200 Subject: [PATCH 3/3] Update README.md Added description how to update multiple domains --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 65e0968..78eefea 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,15 @@ Self-hosted dynamic DNS php script to update netcup DNS API from Router like AVM ### AVM FRITZ!Box Settings * Go to "Internet" -> "Freigaben" -> "DynDNS" * Choose "Benutzerdefiniert" -* Update-URL: `https:///update.php?user=&password=&ipv4=&ipv6=&domain=` - * only the url needs to be adjusted, the rest is automatically filled by your AVM FRITZ!Box - * http or https is possible if valid SSL certificate (e.g. Let's Encrypt) +* Single Domain: + * Update-URL: `https:///update.php?user=&password=&ipv4=&ipv6=&domain=` + * only the url needs to be adjusted, the rest is automatically filled by your AVM FRITZ!Box + * http or https is possible if valid SSL certificate (e.g. Let's Encrypt) +* Multiple Domains + * To Update Multiple domains, add every domain as a comma seperated list. + * Update-URL: `https:///update.php?user=&password=&ipv4=&ipv6=&domain=,,....` + * only the url needs to be adjusted, the rest is automatically filled by your AVM FRITZ!Box + * http or https is possible if valid SSL certificate (e.g. Let's Encrypt) * Domainname: `` * Username: `` * Password: ``