Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // модерация предложки по айди
- $admintoken = '55caa2f4857c21cd5ebdd4e6bc86a4771c56ad708e77e8658f2bb2';//токен админа
- $take_guid = '141583321'; //айди паблика цифры
- // снова детекторы желания анонимности
- $check_anon = array("анон", "антон");
- function vkapi($method) {
- $ch = curl_init("https://api.vk.com/method/".$method);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
- curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
- curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
- $response = curl_exec($ch); curl_close($ch); return $response; }
- $getsuggest = vkapi('wall.get?owner_id=-'.$take_guid.'&offset=0&count=5&filter=suggests&access_token='.$admintoken.'&v=5.60');
- usleep(334000);
- $decode_suggest = json_decode($getsuggest,true);
- $suggested_items = $decode_suggest['response']['items'];
- foreach($suggested_items as $item) {
- $post_id = $item['id'];
- $user_uid = $item['from_id'];
- $post_text = $item['text'];
- // проверяем на желание быть анонимным
- foreach ($check_anon as $check){
- $is_anon = preg_match("/$check/", "$post_text");
- if ($is_anon == 1) { break; } }
- // ну и подпись ноль или единица
- if ($is_anon == 1) { $be_signed = 1; } else { $be_signed = 0; }
- $planirovka = vkapi('wall.post?owner_id=-'.$take_guid.'&signed='.$be_signed.'&post_id='.$post_id.'&filter=suggests&access_token='.$admintoken.'&v=5.60');
- usleep(334000); }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment