<?php
/*
session值：
Array
(
    [QC_userData] => Array
        (
            [state] => ac89a774a69be522b0013e575b79c2a9
            [access_token] => ABCA7BEAE4511660E823AF32B170F972
            [openid] => BC5A8E23FA71A6462E0A041482C3CD52
        )

)
*/


//print_r($_SESSION);die;
$key1 = $_SESSION['access_token'];
$key2 = $_SESSION['openid'];


//if (strlen($key1.$key2) == 64) {

  require_once("login_key/qq/API/qqConnectAPI.php");
  $qc = new QC($key1, $key2);
  $arr = $qc->get_user_info();

  if (!(is_array($arr) && count($arr) > 0)) {
    $err = '出错了！请稍后再试。';

  } else {


    $bar = 'qq';
    @ require ('readonly/function/filter.php');

    $bar_name = filter1($arr["nickname"], true);
    $bar_face = $arr['figureurl_1'];

  }
//} else {
//  $err = '出错了！请稍后再试。';
//}

if (empty($err)) {

    @ require ('login_key/tie.php');

} else {
  echo '<div class="output">'.$err.'</div>';
}
?>