PHP获取QQ头像API接口代码
php教程
我的站长站
2020-09-01
共117人阅读
php获取QQ头像API接口代码,全网首发,中转了腾讯的QQ头像获取接口。

接口源码
<?php
$qq = $_GET['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);
?>在线演示
https://api.tx7.co/qqtx.php?qq=319773591

