Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function fetchInfo($config = ['spec'=>3]) |
||
50 | { |
||
51 | $result = Http::get('http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg', [ |
||
52 | 'uins' => $this->_qq, |
||
53 | ]); |
||
54 | if (Strings::isContains($result, 'portraitCallBack')) { |
||
55 | $json = Json::decode(Strings::partBetween($result, 'portraitCallBack(', ')')); |
||
56 | $this->_result['nickname'] = Charset::toUtf(I::get($json, $this->_qq . '.6'), 'GBK'); |
||
|
|||
57 | } |
||
58 | $this->_result['portrait'] = 'https://q2.qlogo.cn/headimg_dl?dst_uin='.$this->_qq.'&spec='. I::get($config, 'spec', 3); |
||
59 | |||
60 | return $this; |
||
61 | } |
||
62 | } |