Php 正在返回某人正在跟踪的用户列表(超过200个)
我已经在这个SoundCloud网站上工作了一段时间,刚刚开始创建一个流页面替代方案,它将显示在我们的网站上。然而,我无意中遇到了一个问题,我相信这是一个简单的解决方案。我现在正在研究2如何实现正确的输出Php 正在返回某人正在跟踪的用户列表(超过200个),php,soundcloud,Php,Soundcloud,我已经在这个SoundCloud网站上工作了一段时间,刚刚开始创建一个流页面替代方案,它将显示在我们的网站上。然而,我无意中遇到了一个问题,我相信这是一个简单的解决方案。我现在正在研究2如何实现正确的输出 $user_ID = $_GET['id']; $sc = curl_init(); curl_setopt($sc, CURLOPT_URL, 'http://api.soundcloud.com/users/'.$user_ID.'/followings?client_id='.$clie
$user_ID = $_GET['id'];
$sc = curl_init();
curl_setopt($sc, CURLOPT_URL, 'http://api.soundcloud.com/users/'.$user_ID.'/followings?client_id='.$client_ID.'&page_size=200&cursor=1419617528000');
curl_setopt($sc, CURLOPT_HEADER, 0);
curl_setopt($sc, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($sc);
curl_close($sc);
$content = json_decode($output, true);
正如您在上面所看到的,代码当前假设显示多达400个用户,其中有人在跟踪,但是当我们执行以下操作时,2将返回该链接上显示的所有内容
echo "<pre>";
print_r($content);
echo "</pre>";
然而,即使使用这种方法也没有任何作用(尽管我非常确定我正在测试的用户有超过200个他正在跟踪的用户)
编辑:有人遇到了同样的问题,但我不理解关于如何防止这种情况发生的评论解决方案
[199] => Array
(
[avatar_url] => http://a1.sndcdn.com/images/default_avatar_large.png?1485508269
[id] => 72067899
[kind] => user
[permalink_url] => http://soundcloud.com/berthalie30
[uri] => https://api.soundcloud.com/users/72067899
[username] => berthalie30
[permalink] => berthalie30
[last_modified] => 2016/04/06 21:53:03 +0000
[first_name] =>
[last_name] =>
[full_name] =>
[city] =>
[description] =>
[country] =>
[track_count] => 0
[public_favorites_count] => 0
[followers_count] => 21
[followings_count] => 89
[plan] => Free
[myspace_name] =>
[discogs_name] =>
[website_title] =>
[website] =>
[reposts_count] => 32
[comments_count] => 0
[online] =>
[likes_count] => 0
[playlist_count] => 6
)
)
[next_href] => https://api.soundcloud.com/users/24537746/followings?client_id=XXXX&page_size=200&cursor=1406526915000