ok, I got the add to work, I was forgetting the "/" before the "CMD_API_DNS_CONTROL". Here it is so far.
/********************************************************/
function dns_add($sub, $address)
{
$sock = new HTTPSocket;
$sock->connect($this->domain,2222)...