Trying to get friends list from user in PHP, number of friends more than 9 thousand, VK API, the method "friends.get" there are restrictions on the receipt of only 5,000.
Initially tried to this way:
$token = "XXXXXX"; //token
$friends_get = api ('https://api.vk.com/method/friends.get?order=name&fields=name&name_case=ins&v=5.28&access_token='.$token);
$count = $friends_get['count']; // get array of users
for ($i=0; $i < $count; $i++) {
$banned = $friends_get ['items'][$i]['deactivated'];//Select users with a status of 'deactivated'
$id = $friends_get ['items'][$i]['id']; //get a list of user IDs
if ($banned == banned){ //check if the page is blocked
Then drove the whole thing into an array and cycle through that would select only blocked, not the essence..
The problem arose in the fact that friends are more than 5 thousand and I can't figure out how to get the rest.
Tried such request:
$members = json_decode(file_get_contents("https://api.vk.com/method/friends.get?user_id=436764&offset=9000&fields=name"),true);
Added "offset=" and the like were able to remove another part, but can't figure out how to combine them with the previous five thousands, or the request to perform a few times and all put together.
In the browser the link works with a Bang, when you try to get the data in PHP void(
I can not understand why so - stephany_Stark commented on June 8th 19 at 17:13