本文整理匯總了PHP中QC::get_info方法的典型用法代碼示例。如果您正苦於以下問題:PHP QC::get_info方法的具體用法?PHP QC::get_info怎麽用?PHP QC::get_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類QC
的用法示例。
在下文中一共展示了QC::get_info方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getWeiboUserInfo
/**
* 獲取騰訊微博登錄用戶的用戶資料
* 具體接口:http://wiki.open.qq.com/wiki/website/get_info
*
*/
public static function getWeiboUserInfo($paramArr)
{
$options = array('openId' => '', 'accessToken' => '', 'debug' => false);
if (is_array($paramArr)) {
$options = array_merge($options, $paramArr);
}
extract($options);
$obj = new QC(self::$_APPID, $accessToken, $openId, $debug);
$info = $obj->get_info();
if ($info) {
//字符轉碼
array_walk_recursive($info, "api_json_convert_encoding_u2g");
}
return $info;
}
示例2: QC
<?php
/*
*調用接口代碼
*
**/
require_once "../API/qqConnectAPI.php";
$qc = new QC();
$ret = $qc->get_info();
// show result
if ($ret['ret'] == 0) {
echo "<meta charset='utf-8' />";
require_once "get_info.html";
} else {
echo "<meta charset='utf-8' />";
echo "獲取失敗,請開啟調試查看原因";
}
示例3: qq_userinfo
public function qq_userinfo($access_token, $follow = FALSE, $appid = 0)
{
require_once Kohana::find_file('vendor', 'qq/qqConnectAPI');
$site_setting = $this->qq_settings($appid);
$c = new QC($access_token, '', array('appid' => $site_setting['key'], 'appkey' => $site_setting['secret']));
$data = array();
if ($c) {
$uid = $c->get_uid();
$ret = $c->get_info();
//獲取用戶等基本信息
$user_info = $ret['data'];
$avatar = '';
if ($user_info['head']) {
$avatar = $user_info['head'] + '/100';
}
//關注官方微博
if ($follow) {
$c->add_idol(array('name' => $site_setting['uid']));
}
$data['uid'] = $uid;
$data['name'] = $user_info['name'];
$data['avatar'] = $avatar;
}
return $data;
}
示例4: QC
*調用接口代碼
*
**/
require_once "API/qqConnectAPI.php";
$qc = new QC();
$arr = $qc->get_user_info();
echo '<meta charset="UTF-8">';
echo "<p>";
echo "Gender:" . $arr["gender"];
echo "</p>";
echo "<p>";
echo "NickName:" . $arr["nickname"];
echo "</p>";
echo "<p>";
echo "<img src=\"" . $arr['figureurl'] . "\">";
echo "<p>";
echo "<p>";
echo "<img src=\"" . $arr['figureurl_1'] . "\">";
echo "<p>";
echo "<p>";
echo "<img src=\"" . $arr['figureurl_2'] . "\">";
echo "<p>";
echo "vip:" . $arr["vip"];
echo "</p>";
echo "level:" . $arr["level"];
echo "</p>";
echo "is_yellow_year_vip:" . $arr["is_yellow_year_vip"];
echo "</p>";
echo "</hr>";
$arr1 = $qc->get_info();
print_r($arr1['data']);