Skip to content

Instantly share code, notes, and snippets.

@howanghk
howanghk / cloudflare_ddns_updater.php
Last active February 26, 2017 03:48 — forked from kdallas/index.php
Invited by Matthew Prince (https://twitter.com/eastdakota/status/453542354117754882), I am switching to Cloudflare DDNS. However it's difficult to configure my dd-wrt router to update my Dynamic DNS host name with Cloudflare. So I ended up with my router calling a PHP script hosted on my website.
<?php
// ----- dd-wrt DDNS settings: -----
// DDNS Service: Custom
// DYNDNS Server: <your web server domain> (e.g. www.example.com)
// User Name: <anything>
// Password: <anything>
// Host Name: <your DDNS hostname> (e.g. home.example.com)
// URL: /cloudflare_ddns_updater.php?email=<your cloudflare account email>&apikey=<your cloudflare client api key>&domain=<your domain>&host=<your DDNS hostname>
// (e.g.: /cloudflare_ddns_updater.php?email=me@example.com&apikey=123456789012345678901234567890&domain=example.com&host=home.example.com)