Use PHP to get the QQ avatar two ways to share.
<?php $qq =12345678; Echo ' ';
<?php $qq =12345678; $SRC = ' http://q1.qlogo.cn/g?b=qq&nk= '. $qq. ' &s=100&t= '. Time (); Header (' content-type:image/png '); $res =imagecreatefromstring (file_get_contents ($SRC)); Imagepng ($res); Imagedestroy ($res);
The difference between the two methods:
The advantage of the method is that the original image can be output, if your avatar is a dynamic gif, then the output is also a dynamic diagram. The disadvantage is that the speed is slow, not suitable as a way to call the avatar.
Method Two advantage is compared with the first speed is relatively fast, but only grasp the head of the static diagram, will not display dynamic avatar, more suitable as a way to call the avatar.
Articles that you may be interested in