Home > Backend Development > PHP Tutorial > PHP generate QR code online (google api)_PHP tutorial

PHP generate QR code online (google api)_PHP tutorial

WBOY
Release: 2016-07-21 15:09:50
Original
1087 people have browsed it

复制代码 代码如下:





二维码生成-www.ibtf.net





$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 "

图片地址:https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={$wen}

复制发给你的朋友。 返回上一页";
}else{
?>


二维码生成工具


width:
height:


输入网址或者文字:





   




www.bkjia.comtruehttp://www.bkjia.com/PHPjc/327217.htmlTechArticle复制代码 代码如下: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" html xmlns="http://www.w3.org/199...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template