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:
echo $_SERVER["REMOTE_ADDR"]; 
And in the updater code, update the DNS of your sites in a loop using:

Code:
string url = String.Format("https://dynamicdns.park-your-domain.com/update?host=@&domain={0}&password={1}&ip={2}", domain, password, ip);