朋友网关于QQ相关的PHP代码(研究QQ的绝佳资料)(4)

function getInfo($uin)
    {
        //得到好友信息
        //AD为联系地址,AG为年龄,EM为MAIL,FC为头像,HP为网站,JB为职业,PC为邮编,PH为联系电话,PR为简介,PV为省,RN为真实名称,SC为毕业院校,SX为性别,UN为QQ号,NK为QQ昵称
        //以下注释研究 by Hackfan
        //BT为血型,CO为星座,CT为城市,CY为国家,MO为移动电话,SH生肖
        //LV为查询的号码(1为精简查询,2为普通查询,3为详细查询)
        //CV未知,ID未知(身份证?),MT未知,MV未知,
        //VER=1.1&CMD=GetInfo&SEQ=&UIN=&LV=3&UN=
        $str = "VER=1.1&CMD=GetInfo&SEQ=".rand(1000,9000)."&UIN=".$this->uin."&LV=3&UN=".$uin;
        $return = $this->encode($this->query($str));
        if($return['RES']==0 and $return['UIN'] == $this->uin)
        {
            //返回成功
            $arr = array
                (
                    'AD' => $this->utf8_to_gb2312($return['AD']),        //联系地址
                    'AG' => $this->utf8_to_gb2312($return['AG']),        //年龄
                    'BT' => $return['BT'],        //血型
                    'CO' => $return['CO'],        //星座
                    'CT' => $this->utf8_to_gb2312($return['CT']),        //城市
                    'CY' => $this->utf8_to_gb2312($return['CY']),        //国家
                    'EM' => $this->utf8_to_gb2312($return['EM']),        //Email
                    'FC' => $return['FC'],        //头像
                    'HP' => $this->utf8_to_gb2312($return['HP']),        //网站
                    'JB' => $this->utf8_to_gb2312($return['JB']),        //职业
                    'MO' => $return['MO'],        //移动电话
                    'PC' => $this->utf8_to_gb2312($return['PC']),        //邮编
                    'PH' => $this->utf8_to_gb2312($return['PH']),        //联系电话
                    'PR' => $this->utf8_to_gb2312($return['PR']),        //简介
                    'PV' => $this->utf8_to_gb2312($return['PV']),        //省
                    'RN' => $this->utf8_to_gb2312($return['RN']),        //真实姓名
                    'SC' => $this->utf8_to_gb2312($return['SC']),        //毕业院校
                    'SH' => $return['SH'],        //生肖
                    'SX' => $return['SX'],        //性别
                    'UN' => $return['UN'],        //QQ号
                    'NK' => $this->utf8_to_gb2312($return['NK'])        //昵称
                );
            return $arr;
        }
        else
        {
            //返回失败
            return QQ_RETURN_FAILED;
               
        }

}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/e7cf048b808aaaaf76e4422e219f844a.html