search
Homephp教程php手册PHP在线生成二维码代码(google api)的例子,googleapi

PHP在线生成二维码代码(google api)的例子,googleapi

Jun 13, 2016 am 09:29 AM
apigooglephpgenerationcodeexampleonlinegenerateofcode

PHP在线生成二维码代码(google api)的例子,googleapi

通过google在线生成二维码的api在线生成二维码。

代码:





二维码生成-www.jbxue.com





$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 "PHP在线生成二维码代码(google api)的例子,googleapi

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

复制发给你的朋友。 返回上一页";
}else{
?> (脚本学堂 编辑整理 www.jbxue.com)


二维码生成工具


width:
height:


输入网址或者文字:








}?>

为何php中用了urlencode处理字符串通过谷歌二维码APi生成二维码得到的中文汉字

baidu MP3 编码是GBK的, 你的代码里面是UTF8的编码为GBK    urlencode('脚步') = %BD%C5%B2%BD编码为UTF8    urlencode('脚步') = %E8%84%9A%E6%AD%A5你得用iconv函数转一下
 

有PHP网站内生成二维码的代码?JAVA的也行

PHP QRCODE
你试试
 

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function