<?php
$qq=7758521;//要获取头像的QQ号码
$src='https://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);
?>