<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>dwt&#039;s life - qq</title>
<link>https://dwt.life/tag/qq/</link>
<atom:link href="https://dwt.life/feed/tag/qq/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Thu, 16 Dec 2021 21:05:00 +0800</lastBuildDate>
<pubDate>Thu, 16 Dec 2021 21:05:00 +0800</pubDate>
<item>
<title>QQ匿名头像获取</title>
<link>https://dwt.life/archives/149/</link>
<guid>https://dwt.life/archives/149/</guid>
<pubDate>Thu, 16 Dec 2021 21:05:00 +0800</pubDate>
<dc:creator>Ricky</dc:creator>
<description><![CDATA[通用地址：http://q1.qlogo.cn/g?b=qq&amp;nk=QQ号码&amp;s=640高清头像：http://q.qlogo.cn/headimg_dl?dst_uin=QQ号...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>通用地址：<br><code>http://q1.qlogo.cn/g?b=qq&amp;nk=QQ号码&amp;s=640</code><br>高清头像：<br><code>http://q.qlogo.cn/headimg_dl?dst_uin=QQ号码&amp;spec=640&amp;img_type=jpg</code><br>昵称：<br><code>http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins=QQ号码</code></p><table><thead><tr><th>s/spec</th><th>PX</th></tr></thead><tbody><tr><td>1</td><td>40 x 40</td></tr><tr><td>2</td><td>40 x 40</td></tr><tr><td>3</td><td>100 x 100</td></tr><tr><td>4</td><td>140 x 140</td></tr><tr><td>5</td><td>640 x 640</td></tr><tr><td>40</td><td>40 x 40</td></tr><tr><td>100</td><td>100 x 100</td></tr></tbody></table><p>但是这样会暴露QQ号码.</p><p>访问下面的地址就能得到一个json：<br><code>http://ptlogin2.qq.com/getface?appid=101382166&amp;imgtype=1&amp;encrytype=0&amp;devtype=0&amp;keytpye=0&amp;uin=QQ号码&amp;r=0.17780657206333406</code><br>简化下无用参数，变成：<br><code>http://ptlogin2.qq.com/getface?&amp;imgtype=1&amp;uin=QQ号码</code><br>访问上述地址得到的json：<br><code>pt.setHeader({&quot;QQ号&quot;:&quot;http://q3.qlogo.cn/g?b=qq&amp;k=对应的K值&amp;s=40&amp;t=1483323281&quot;});</code></p><pre><code class="lang-php">&lt;?php
$qq = &#039;你的QQ号码&#039;;
$geturl = &#039;http://ptlogin2.qq.com/getface?&amp;imgtype=1&amp;uin=&#039;.$qq;
$qquser = file_get_contents($geturl);
$str1 = explode(&#039;&amp;k=&#039;, $qquser);
$str2 = explode(&#039;&amp;s=&#039;, $str1[1]);
$k = $str2[0];
$qqimg = &#039;https://q1.qlogo.cn/g?b=qq&amp;k=&#039;.$k.&#039;&amp;s=100&#039;;
echo $qqimg;</code></pre><p>或者获取这个链接301后的地址：<br><code>https://s.p.qq.com/pub/get_face?img_type=3&amp;uin=QQ号</code></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://dwt.life/archives/149/#comments</comments>
<wfw:commentRss>https://dwt.life/feed/tag/qq/</wfw:commentRss>
</item>
</channel>
</rss>