Как получить статус пользователя через VK API
Код:
<?php $access_token=''; $uid=''; $getStatus = curl('https://api.vk.com/method/status.get?uid='.$uid.'&access_token='.$access_token); $json = json_decode($getStatus,1); echo $json['response']['text']; 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; } ?>
Теги: статус,пользователя,VK,API