二维码生成API接口


接口地址

http://xsdggw.cn/t/tool/api/api/qrcode.php

返回格式

图片

请求方式:

GET/POST

请求示例:

http://xsdggw.cn/t/tool/api/api/qrcode.php?text=内容

参数说明

名称 必填 类型 说明
text string 输入内容

返回数据

二维码图片一张

调用实例

<img src="http://xsdggw.cn/t/tool/api/api/qrcode.php?text=二维码内容" alt=""">

示例代码

<?php
$qq = $_GET['qq'];
$src = "http://xsdggw.cn/t/tool/api/api/qrcode.php?text=".$qq ."";
header('Content-type: image/png');
$res = imagecreatefromstring(file_get_contents($src));
imagepng($res);
imagedestroy($res);
?>