Example of PHP online generation of QR code code (google api), googleapi
Generate QR code online through google's online QR code generation api.
Code:
QR code generation-www.jbxue.com body{text-align:center;background:#f5f5f5;line-height:22px;font-size:14px;color:#888;}
.newcrop{margin:10;}
. er{width:700px;margin:0px auto;border:1px solid gray}
span{background:#645;color:#fff}
body form {text-align:center;padding: 3px 6px 3px 6px ;}
input.txt{color: #00008B;background-color: #ADD8E6;border: 1px inset #00008B;width: 200px;}
input.btn {color: #00008B;background-color: # ADD8E6;border: 1px outset #00008B;padding: 2px 4px 2px 4px;}
input.smallInput{border:1 solid black;FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-VARIANT: normal; FONT- WEIGHT: normal; HEIGHT: 18px; LINE-HEIGHT: normal}
< ?php
$content=$_GET['content'];
$width=$_GET['width']?$_GET['width']:300;
$height=$_GET[' height']?$_GET['height']:300;
if($content){
echo "The text you entered is:
$content echo "The width you selected is:
$width ";
echo "The height you selected is:
$height ";
echo "The generated QR code image is:
";
$wen = urlencode(mb_convert_encoding($content, 'utf- 8', 'gb2312'))."";
echo "
Image address:
https://chart.googleapis.com/chart?cht=qr&chld=H&chs={$width}x{$height}&chl={ $wen} Copy and send to your friends.
Return to the previous page";
}else{
?> (Edited by Scripting School www.jbxue .com)
< ;? }?>
generated by QR code API
baiduMP3 encoding is GBK, your code is UTF8 encoded as GBK urlencode ('steps')= %BD%C5%B2%BD encoded as UTF8 urlencode(' Footsteps")= %E8%84%9A%E6%AD%A5 You have to use the iconv function to turn it
PHP QRCODE
You try it
http://www.bkjia.com/PHPjc/833844.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/833844.htmlTechArticleExample of PHP online generation of QR code code (google api), googleapi API for generating QR code online through google Generate QR code online. Code: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
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
Latest Articles by Author
-
2024-10-22 09:46:29
-
2024-10-13 13:53:41
-
2024-10-12 12:15:51
-
2024-10-11 22:47:31
-
2024-10-11 19:36:51
-
2024-10-11 15:50:41
-
2024-10-11 15:07:41
-
2024-10-11 14:21:21
-
2024-10-11 12:59:11
-
2024-10-11 12:17:31