I moved my code base from one server to another - no code change, the only difference being https. I modified my app in Soundcloud developers to be https://url
A much better solution would be to follow the answer listed on the following answer to Twitter API returns NULL on XAMPP which states that you should update the CA root certifications for your PHP solution.
For more information:
It's hard to debug this exception without seeing the source code. But my guess is that your problem might be related to this issue:
https://github.com/mptre/php-soundcloud/issues/3
Which means that you should modify your accessToken
call and include the extra cURL parameters.
$accessToken = $soundcloud->accessToken($code, $postData, array(
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false,
));