Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Soundcloud API无效\u Http\u响应\u代码\u异常Http代码0_Php_Soundcloud - Fatal编程技术网

Php Soundcloud API无效\u Http\u响应\u代码\u异常Http代码0

Php Soundcloud API无效\u Http\u响应\u代码\u异常Http代码0,php,soundcloud,Php,Soundcloud,我正在使用SoundCloudAPI文档中的示例代码。 但似乎什么都不管用: require_once 'Services/Soundcloud.php'; // create a client object with your app credentials $client = new Services_Soundcloud('YOUR_CLIENT_ID'); // find all sounds of buskers licensed under 'creative commons s

我正在使用SoundCloudAPI文档中的示例代码。 但似乎什么都不管用:

require_once 'Services/Soundcloud.php';

// create a client object with your app credentials
$client = new Services_Soundcloud('YOUR_CLIENT_ID');

// find all sounds of buskers licensed under 'creative commons share alike'
$tracks = $client->get('tracks', array('q' => 'buskers', 'license' => 'cc-by-sa'));
我已经纠正了示例代码中的明显错误,将CLIENT_SECRET包含在内 但我只是得到了这个错误:

致命错误:未捕获异常“服务\u声音云\u无效\u Http\u响应\u代码\u异常”,并显示消息“请求的URL以Http代码0响应”


有什么想法吗?我不敢相信他们没有提供实际有效的示例。

错误消息说该网站正在返回无效状态。在担心代码之前,应该先验证站点是否正常工作。