php代码获取用户QQ头像

Written by

in

<?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);
?>

 

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

站内搜索