利用google的api生成二维码

废话少说,直接贴代码

<?php
	
	/*
	&cht=qr 这是说图表类型为qr也就是二维码
	&chs=200×200 这是说生成图片尺寸为200×200,是宽x高
	&choe=UTF-8 这是说内容的编码格式为UTF-8,此值默认为UTF-8
	&chld=L|4 L代表默认纠错水平; 4代表二维码边界空白大小,可自行调节
	&chl=XXXX 这是QR内容,也就是解码后看到的信息。包含中文时请使用UTF-8编码汉字,否则将出现问题
	*/

	$url = urlencode("http://www.baidu.com");
	$imgdata="http://chart.apis.google.com/chart?chs=400x400&cht=qr&chld=L|0&chl=".$url;
	echo "<img src='$imgdata'>";

详细文档见:https://developers.google.com/chart/infographics/docs/qr_codes

This tip on men fashion will certainly save a lot of money
gay porn Timberland boots for autumn and winter become popular

Stay Away From Coach For Now
pornoWork clothes for curvy figures
youporn
此条目发表在 网站开发 分类目录。将固定链接加入收藏夹。

评论功能已关闭。