By taxhack
if (ddns_choice == "duckdns") {
update_url = "http://www.duckdns.org/update?domains=" + ddns_d + "&token=" + ddns_u + "&ip=" + new_ip + "";
}else if (ddns_choice == "mtcloud") {
update_url = "https://api.digitalocean.com/v2/domains/" + ddns_d + "&token=" + ddns_u + "&ip=" + new_ip + "";
} else if (ddns_choice == "noip") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@dynupdate.no-ip.com/nic/update?hostname=" + ddns_d + "&myip=" + new_ip + "";
} else if (ddns_choice == "dyndns") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@members.dyndns.org/v3/update?hostname=" + ddns_d + "&myip=" + new_ip + "";
} else if (ddns_choice == "dynu") {
update_url = "http://api.dynu.com/nic/update?hostname=" + ddns_d + "&myip=" + new_ip + "&username=" + ddns_u + "&password=" + ddns_p + "";
} else if (ddns_choice == "enom") {
update_url = "http://dynamic.name-services.com/interface.asp?command=SetDnsHost&HostName=" + ddns_d + "&Zone=" + ddns_u + "&DomainPassword=" + ddns_p + "&Address=" + new_ip + "";
} else if (ddns_choice == "all-inkl") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@dyndns.kasserver.com/?myip=" + new_ip;
} else if (ddns_choice == "selfhost.de") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@carol.selfhost.de/nic/update?";
} else if (ddns_choice == "dyndns.it") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@update.dyndns.it/nic/update?hostname=" + ddns_d;
} else if (ddns_choice == "strato") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@dyndns.strato.com/nic/update?hostname=" + ddns_d + "&myip=" + new_ip + "";
} else if (ddns_choice == "freemyip") {
update_url = "http://freemyip.com/update?domain=" + ddns_d + "&token=" + ddns_u + "&myip=" + new_ip + "";
} else if (ddns_choice == "afraid.org") {
update_url = "http://sync.afraid.org/u/" + ddns_u + "/";
} else if (ddns_choice == "ovh") {
update_url = "http://" + ddns_u + ":" + ddns_p + "@www.ovh.com/nic/update?system=dyndns&hostname=" + ddns_d + "&myip=" + new_ip + "";
} else {
Serial.println("## INPUT CORRECT DDNS SERVICE NAME ##");
return;
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
To create a new DNS record, you would need to pass the following payload:
{
"type": "A",
"name": "www",
"data": "162.10.66.0",
"priority": null,
"port": null,
"ttl": 1800,
"weight": null,
"flags": null,
"tag": null
}
So the request itself, would look like this:
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
-d '{"type":"A","name":"www","data":"162.10.66.0","priority":null,"port":null,"ttl":1800,"weight":null,"flags":null,"tag":null}' \
"https://api.digitalocean.com/v2/domains/example.com/records"
Best, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.