PHP获取QQ头像API接口代码

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
本文结束
 
       烟云博客
烟云博客                 
    
    


