PHP在线生成二维码代码(google api)
发布时间:2020-05-24 15:47:12 所属栏目:PHP 来源:互联网
导读:通过google在线生成二维码的api在线生成二维码,需要的朋友可以参考下
|
<div class="codetitle"><a style="CURSOR: pointer" data="30181" class="copybut" id="copybut30181" onclick="doCopy('code30181')"> 代码如下:<div class="codebody" id="code30181"> <body class="newcrop"><div class="er"> <?php $content=$_GET['content']; $width=$_GET['width']?$_GET['width']:300; $height=$_GET['height']?$_GET['height']:300; if($content){ echo "你输入的文字是: $content "; echo "你选择的宽度是: $width "; echo "你选择的高度是: $height "; echo "生成的二维码图像是: "; $wen = urlencode(mb_convert_encoding($content,'utf-8','gb2312')).""; echo "<img id=qrcode_img src=https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen} /> 图片地址:https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen} 复制发给你的朋友。 返回上一页"; }else{ ?> <form action="" method="get" onsubmit="return post();"> |
