Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. $cliend_id = "6906842";
  2.  
  3. $country_id = 1; // Россия
  4. $city_id = 153; // Хабаровск
  5.  
  6. // $response = file_get_contents("https://oauth.vk.com/authorize?client_id={$id}&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=friends,groups&response_type=token&v=5.52");
  7.  
  8. $access_token = "ea0f701a24229dd526bb05ca9d7229bb29ae3db897931c1fd80d3977b90ad852190bb95fc59a759f48074";
  9.  
  10. $fields = [
  11. // 'photo_id',
  12. // 'verified',
  13. 'sex',
  14. 'bdate',
  15. 'city',
  16. 'country',
  17. // 'home_town',
  18. // 'has_photo',
  19. // 'photo_50',
  20. // 'photo_100',
  21. // 'photo_200_orig',
  22. // 'photo_200',
  23. // 'photo_400_orig',
  24. // 'photo_max',
  25. // 'photo_max_orig',
  26. // 'online',
  27. /*
  28. 'lists',
  29. 'domain',
  30. 'has_mobile',
  31. 'contacts',
  32. 'site',
  33. 'education',
  34. 'universities',
  35. 'schools',
  36. 'status',
  37. 'last_seen',
  38. 'followers_count',
  39. 'common_count',
  40. 'occupation',
  41. 'nickname',
  42. 'relatives',
  43. 'relation',
  44. 'personal',
  45. 'connections',
  46. 'exports',
  47. 'wall_comments',
  48. 'activities',
  49. 'interests',
  50. 'music',
  51. 'movies',
  52. 'tv',
  53. 'books',
  54. 'games',
  55. 'about',
  56. 'quotes',
  57. 'can_post',
  58. 'can_see_all_posts',
  59. 'can_see_audio',
  60. 'can_write_private_message',
  61. 'can_send_friend_request',
  62. 'is_favorite',
  63. 'is_hidden_from_feed',
  64. 'timezone',
  65. 'screen_name',
  66. 'maiden_name',
  67. 'crop_photo',
  68. 'is_friend',
  69. 'friend_status',
  70. 'career',
  71. 'military',
  72. 'blacklisted',
  73. 'blacklisted_by_me'
  74. */
  75. ];
  76.  
  77. $fields = implode(',', $fields);
  78.  
  79. $id = 1;
  80. $age = 18;
  81. $array = [];
  82.  
  83. while ($id < 30) {
  84. // $query = file_get_contents("https://api.vk.com/method/users.search?sort=0&offset=0&count=1000&country={$country_id}&city={$city_id}&age_from={$age}&age_to={$age}&q=&fields={$fields}&access_token=" . $access_token . "&v=5.92");
  85. $query = file_get_contents("https://api.vk.com/method/users.get?&user_ids={$id}&fields={$fields}&access_token=" . $access_token . "&v=5.92");
  86. $query = json_decode($query, true);
  87. $array[] = $query['response'];
  88. $id++;
  89. sleep(2);
  90. }
  91.  
  92. $a = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement