本文整理汇总了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']);