Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. <?php
  2. $token = '3bbe0c487729de7ee8d3f52b11c9118a1681ac119c2178c29e561d44b9be9a5ff5b53e7e356dedca60c76';
  3. $clubs = array(18203014);
  4. $user_id = 79490249;
  5. $message = " ввввв))) ";
  6.  
  7. echo '<pre>';
  8. foreach ($clubs as $club) {
  9.     $posts = json_decode(file_get_contents('https://api.vk.com/method/wall.get?count=100&owner_id=-'.$club.'&filter=others&v=5'), true);
  10.     foreach ($posts['response']['items'] as $post) {
  11.         if ($post['from_id'] == $user_id) {
  12.             print_r(json_decode(file_get_contents('https://api.vk.com/method/wall.delete?owner_id=-'.$club.'&post_id='.$post['id'].'&v=5&access_token='.$token), true));
  13.         }
  14.     }
  15.     print_r(json_decode(file_get_contents('https://api.vk.com/method/wall.post?owner_id=-'.$club.'&v=5&message='.urlencode($message).'&access_token='.$token), true));
  16.     echo '<pre>';
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement