dongtong848825 2016-02-01 19:48
浏览 72

php / curl / gracenote ERROR searchTrack / get release Date

 include("../Vendor/phpGracenote/Gracenote.class.php");

 $clientID = ' my Key ';
 $clientTag = ' my Tag ';
 $api = new Gracenote\WebAPI\GracenoteWebAPI($clientID, $clientTag);
 $userID = $api->register();



 $results = $api->searchTrack("Kings Of Convenience", "Riot On An Empty Street", "Homesick", Gracenote\WebAPI\GracenoteWebAPI::BEST_MATCH_ONLY);

 pr($results);

I only get an error:

cURL returned an error when trying to make the request. Error: An Internal Error Has Occurred.

exception: code=2003, message=cURL returned an error when trying to make the request., ext=60

I think the problem is, that the i first must register my client information in order to get a userID.

 $userID = $api->register();

But i get this Error and don't now what i can do...

... in the GracenoteError.class.php:

const HTTP_RESPONSE_ERROR      = 2003; // A cURL error that wasn't a timeout or HTTP400 response.
  • 写回答

1条回答 默认 最新

  • doudou20080720 2016-02-06 01:32
    关注

    Seems like a cURL SSL certificate issue. I resolved the problem by doing following:

    1. Go to https://curl.haxx.se/ca/cacert.pem, copy the whole page and save it as "cacert.pem" in a folder of your choice.
    2. Open your php.ini, search for "curl.cainfo" and insert "path\to\your\cacert.pem". (Or simply insert "curl.cainfo = "path\to\your\cacert.pem" if no "curl.cainfo" found.)
    3. Restart your server, and you should be good to go.
    评论

报告相同问题?

悬赏问题

  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入