fork download
  1. $access_token='';
  2. $admin=id;
  3.  
  4. $test= api('messages.get','count=2');
  5.  
  6. for($i=0; $i<= count($test['response']['items']); $i++){
  7. $message=explode(' ',mb_strtolower($test['response']['items'][$i]['body'], 'UTF-8'));
  8. $user_id=$test['response']['items'][$i]['user_id'];
  9. $chat_id=$test['response']['items'][$i]['chat_id'];
  10. $read_state=$test['response']['items'][$i]['read_state'];
  11.  
  12. if(count($test['response']['items'][$i]) <0){
  13. if($read_state == 1){
  14. $esf=0;
  15. } else {
  16. if($message[0]=='test'){
  17. api('messages.send','peer_id='.$user_id.'&message='.urlencode('nope').'');
  18. }
  19. }
  20. }
  21. }
  22. print_r($message);
  23. function api($method, $args){
  24. global $access_token;
  25. $getl = json_decode(file_get_contents('https://a...content-available-to-author-only...k.com/method/'.$method.'?'.$args.'&v=5.65&access_token='.$access_token),1);
  26. return $getl;
  27. }
  28. ?>
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
$access_token='';
$admin=336222509;

$test= api('messages.get','count=2');

for($i=0; $i<= count($test['response']['items']); $i++){
  $message=explode(' ',mb_strtolower($test['response']['items'][$i]['body'], 'UTF-8'));
  $user_id=$test['response']['items'][$i]['user_id'];
  $chat_id=$test['response']['items'][$i]['chat_id'];
  $read_state=$test['response']['items'][$i]['read_state'];
  
 if(count($test['response']['items'][$i]) <0){
   if($read_state == 1){
   $esf=0;
   } else {
   if($message[0]=='test'){
   api('messages.send','peer_id='.$user_id.'&message='.urlencode('nope').'');
}
}
}
}
print_r($message);
function api($method, $args){
  global $access_token;
  $getl = json_decode(file_get_contents('https://a...content-available-to-author-only...k.com/method/'.$method.'?'.$args.'&v=5.65&access_token='.$access_token),1);
  return $getl;
}
?>