Начало: я сам разобрался как проверить вступил ли в группу человек(код ниже). Вопрос: как перед проверкой вывести окно с группой вк? Всем заранее спасибо. PHP: <?php $client_id = ''; // ID приложения $client_secret = ''; // Защищённый ключ $redirect_uri = ''.$_SERVER["PHP_SELF"]; // Адрес сайта $url = 'http://oauth.vk.com/authorize'; $params = array( 'client_id' => $client_id, 'redirect_uri' => $redirect_uri, 'response_type' => 'code' ); echo $link = '<button class="button special fit" style="box-shadow: rgb(255, 255, 255) 0px 0px 20px 10px;" onclick="window.location.href=\'' . $url . '?' . urldecode(http_build_query($params)) . '\'">2. Поставить лайк</button>'; if (isset($_GET['code'])) { $result = false; $params = array( 'client_id' => $client_id, 'client_secret' => $client_secret, 'code' => $_GET['code'], 'redirect_uri' => $redirect_uri ); $token = json_decode(file_get_contents('https://oauth.vk.com/access_token' . '?' . urldecode(http_build_query($params))), true); if (isset($token['access_token'])) { $params = array( 'uids' => $token['user_id'], 'fields' => 'uid,first_name,last_name,screen_name,sex,bdate,photo_big', 'access_token' => $token['access_token'] ); $userInfo = json_decode(file_get_contents('https://api.vk.com/method/users.get' . '?' . urldecode(http_build_query($params))), true); if (isset($userInfo['response'][0]['uid'])) { $userInfo = $userInfo['response'][0]; $result = true; } } if ($result) { $req = file_get_contents("https://api.vk.com/method/likes.getList?type=".type($row["link"])."&owner_id=".first($row["link"])."&item_id=".second($row["link"])); $req = file_get_contents('https://api.vk.com/method/groups.isMember?group_id='.$idgroup.'&user_id='.$userInfo['uid'].'&extended=1'); $data = json_decode($req, true); if($data['response']['member']==1){ echo 'sostoit'; $_SESSION['next'] = $_SESSION['next'] + 1; echo $_SESSION['next']; exit ('<html><head><meta http-equiv="Refresh" content="0; URL='.$seturl.'"></head></html>'); }else{ echo 'nein'; $_SESSION['next'] = $_SESSION['next'] + 0; exit ('<html><head><meta http-equiv="Refresh" content="0; URL='.$seturl.'"></head></html>'); } } }