网站链接转换二维码存有多方法,最真的是用JS生成,直观易懂。大众资源网截图分享另一种PHP生成网址链接二维码方法, 跟前几天的QQ头像以获取一个道理 对接别人的接口 也就是中转别人的USB 化为自己的USB 接口源码调用的是网址二维码 如果接口失灵了 大家可以替代USB源码的接口地址 另外我附了几个网址二维码接口 提供更多大家交会采用等等的。
API接口调用代码
<?php $url = $_GET['url']; $src = 'https://api.tx7.co/qrcode.php?url='.$url.''; error_reporting(0); $res = imagecreatefromstring(file_get_contents($src)); if(!$url) { echo '{"code":201,"msg":"恳请核对域名"}'; exit; }else{ header('Content-type: image/png'); imagepng($res); } ?>
分享几款二维码生成API接口
https://bshare.optimix.asia/barCode?site=weixin&url= https://www.kuaizhan.com/common/encode-png?large=true&data= https://api.qrserver.com/v1/create-qr-code/?size=150x150&data= https://sapi.k780.com/?app=qr.get&data= https://qr.liantu.com/api.php?text= https://api.tx7.co/qrcode.php?url=
USB调用
激活APIUSB调用代码,保存qrcode.php文件内,浏览器访问:你的网站/qrcode.php/?url=你要调用网址