PHP 5.6 or newer require a valid SSL certificate to connect. So the API call will fail if DA SSL cert is invalid. You can use PHP 5.5 to fix this problem or fix SSL of DirectAdmin host.