Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- getListesToFlood('blckct', '4c62658dd02df4b5d1084c04c2a979c66008459c2158ef2e39c7b6c455a98bc4f347e73a369b116ef91aa');
- function getListesToFlood($club, $token)
- {
- $packet = 0;
- $limit = 1000;
- $list_user = array();
- $ch = curl_init();
- do {
- $offset = $packet * $limit;
- $url_start = 'https://api.vk.com/method/groups.getMembers?';
- curl_setopt($ch, CURLOPT_URL, $url_start."group_id=" . $club . "&offset=$offset&fields=online,can_write_private_message&v=5.102&access_token=" . $token);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $content = curl_exec($ch);
- $members = json_decode($content, true);
- foreach ($members['response']['items'] as $user_array) {
- if ((isset($user_array['id'])) && ($user_array['can_write_private_message'] == 1) && ($user_array['online'] == 1)) {
- $list_user[] = $user_array['id'];
- if (count($list_user) == 99) {
- $imp = implode(',', $list_user);
- echo $imp . "<br><br>";
- $list_user = array();
- }
- }
- }
- $packet++;
- } while ($members['response']['count'] > $offset + $limit);
- curl_close($ch);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement