With all the IoT devices around Arduino, esp8266 etc. a hostname is often needed. https://freedns.afraid.org/ offers DDNS subdomains that are updatable through a special URL.
So this is a simple function that does just that.
Simply place files “afraidddns.h” and “afraidddns.ino” use
in your main program and call
updateAfraid(); when needed
You will need your afraid.org subdomain hash which you can get by logging in https://freedns.afraid.org/dynamic/ and checking the URL at the bottom of the page where it says Direct URL.