主要以谷歌的为主,但是最近国家管控的更严格了 谷歌二维码API 现在都不能访问
除了谷歌 淘到 另外在线生成二维码 API
说明:把url=后面的网址改成你的,四种任选一。 http://pan.baidu.com/share/qrcode?w=150&h=150&url=你的内容 http://b.bshare.cn/barCode?site=weixin&url=你的内容 http://s.jiathis.com/qrcode.php?url=你的内容 http://www.kuaizhan.com/common/encode-png?large=true&data=你的内容
说明:下面是EMLOG程序专用的,把代码复制到EMLOG模板echo_log.php你需要的位置即可。 http://b.bshare.cn/barCode?site=weixin&url=<?php echo Url::log($logid);?> http://s.jiathis.com/qrcode.php?url=<?php echo Url::log($logid);?>
谷歌的DEMO 也粘出来 说不定啥时候就能使用了么
/** *利用google api生成二维码图片 (国内部分地区无法使用) * $content:二维码内容参数 * $size:生成二维码的尺寸,宽度和高度的值 * $lev:可选参数,纠错等级 * $margin:生成的二维码离边框的距离 */ function create_erweima($content, $size = '200', $lev = 'L', $margin= '0') { $content = urlencode($content); $image = '<img alt="支付宝支付二维码" src="http://chart.apis.google.com/chart?chs='.$size.'x'.$size.'&cht=qr&chld='.$lev.'|'.$margin.'&chl='.$content.'" style="width:'.$size.'px;height:'.$size.'px;" />'; return $image; }