Open chnagy opened 1 month ago
Also a good idea would be to compare the current IP address (as returned by getCurrentPublicIPv[4|6] functions) to the result of a DNS [A|AAAA] record resultion (see dns_get_record function in PHP). If they match, you don't even have to log into the Netcup API because there's nothing for you to do anyway.
Just wanted to leave my suggestion to reduce the frequency of the api calls.
Many modern router offer a dyndns feature. I published a dummy GET endpoint in my local network which executes your update.php and entered the host as dyndns server in my router so it triggers the update script only when I receive a new IP from my ISP.