To do dynamic update of DNS with NameCheap domain accounts you can simply use a URL that contains your new IP address of the server and other credentials.

To code a solution, you should put a PHP script on a remote server that outputs the requesting server IP such as this simple code:

PHP Code:
And in the updater code, update the DNS of your sites in a loop using:

string url = String.Format("{0}&password={1}&ip={2}", domain, password, ip);