方法一:
<p><?php</p>$qq=1290026290;<br /><p>echo '@@##@@';</p><p><span>立即学习</span>“<a href="https://pan.quark.cn/s/7fc7563c4182" style="text-decoration: underline !important; color: blue; font-weight: bolder;" rel="nofollow" target="_blank">PHP免费学习笔记(深入)</a>”;</p>
方法二:
$qq=1290026290;<br />$src='http://q1.qlogo.cn/g?b=qq&nk='.$qq.'&s=100&t='.time();<br />header('Content-type: image/png');<br />$res=imagecreatefromstring(file_get_contents($src));<br />imagepng($res);<br /><p>imagedestroy($res);</p>这两种方法的区别:
方法一的优点是可以输出头像的原图,如果你的头像是动态的gif,那么输出的也是动态图。缺点是速度比较慢,不适合作为调用头像的方法。
方法二的优点是相比第一种速度比较快,但只抓取头像的静态图,不会显示动态头像,比较适合作为调用头像的方法。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号