Soundcloud: The requested URL responded with HTTP code 0

后端 未结 2 869
借酒劲吻你
借酒劲吻你 2021-01-13 18:15

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

相关标签:
2条回答
  • 2021-01-13 19:10

    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:

    • http://www.saotn.org/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/
    • http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/
    0 讨论(0)
  • 2021-01-13 19:11

    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,
    ));
    
    0 讨论(0)
提交回复
热议问题