There is a simple solution using PowerDNS with MySQL backend using some BASH scripting and PHP. It's very easy to setup if you are running Debian. You can checkout the source code here: DynDNS with PowerDNS.