'Я 😴', 1 => 'Я с 💻'
);
$online = array(
1 => 'Я с 📲'
);
if ($countR == 1) {
$answer="$online[$countR]";
} else {
$answer="$online2[$countD]";
}
$getLikes = curl('https://api.vk.com/method/photos.get?album_id=profile&rev=1&extended=1&count=1&access_token='.$access_token.'&v=3.0');
$getLikesJson = json_decode($getLikes,1);
$likes = $getLikesJson['response']['0']['likes']['count'];
$список_блоченных = curl('https://api.vk.com/method/account.getBanned?access_token='.$access_token);
$json = json_decode($список_блоченных,1);
$колво_в_чс = $json['response']['0'];
$getMessages = curl('https://api.vk.com/method/messages.get?lang=ru&v=3.0&count=1&access_token='.$access_token);
$getMessagesJson = json_decode($getMessages,1);
echo "Ответ GetMessages
";
print_r($getMessagesJson);
echo "
";
echo "Ответ GetDialogs";
print_r($getDialogsJson);
echo "
";
settype($userIdLastMessage, 'array');
settype($userIdLastMessage, 'array');
$userIdLastMessage = $getMessagesJson['response']['1']['uid'];
$getDataOfLastUser = curl('https://api.vk.com/method/users.get?lang=ru&v=3.0&user_ids='.$userIdLastMessage.'&name_case=gen&access_token='.$access_token);
$getDataOfLastUserJson = json_decode($getDataOfLastUser,1);
$lastUserName = $getDataOfLastUserJson['response']['0']['first_name'];
$lastUserSurname = $getDataOfLastUserJson['response']['0']['last_name'];
$smiles = array("😸", "🙀", "😿","😾", "😹", "😼", "😻", "😎","😉", "😈", "😂", "😃", "😀");
$smiles2 = array("🐸", "👻", "😺","😘", "😚", "😎", "😍", "😜","😃", "💍", "💎", "💌", "😙");
$rand = rand(0,count($smiles) - 1);
$rand2 = rand(0,count($smiles) - 1);
$rand3 = rand(0,count($smiles2) - 1);
$smail = $smiles2[$rand];
$smail2 = $smiles2[$rand2];
$smail3 = $smiles[$rand3];
// ========================================
// Самое вкусное - СТАТУС! |
// ========================================
$status = '|⌛|'.$time.' ('.$smail2.') На аве:'.$likes.'❤ ('.$smail.')
|📅|'.$date.' Последнее ✉ от '.$lastUserName.' '.$lastUserSurname.' | ⛔В чс: '.$колво_в_чс.' | '.$answer.' | ('.$smail3.')';
$Status = curl('https://api.vk.com/method/status.set?text='.urlencode($status).'&access_token='.$access_token);
function curl( $url ){
$ch = curl_init( $url );
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;
}//wWw.Statuses.96.LT
?>