※ 本文為 dinos 轉寄自 ptt.cc 更新時間: 2013-05-21 14:06:09
看板 PHP
作者 標題 Re: [請益] QR code image generator and decoder
時間 Tue May 21 13:21:13 2013
兩種做法:
1.Google Api
$url = urlencode("1234");
$image = imagecreatefrompng("http://chart.apis.google.com/chart?cht=qr&chs=120x120&chl=$url"%29;
$pdf->Image("file.png", 56, 3 , 8, 8);
用google api產生圖檔套PDF
2.用套件(QRcode或barcode套件)產生
$url = urlencode("TEST 1234");
$image = imagecreatefrompng("http://localhost/barcode/html/image.php?code=code39&o=1&t=30&r=1&f=2&a1=&a2=&text=$url"%29;
imagepng($image, "file.png");
$pdf->Image("file.png", 52, 3 , 12, 6);
在local端用套件產生圖檔套PDF
Barcode:http://codeslibrary.net/sc.php?id=7613&code=Barcode Generator
QRcode:http://phpqrcode.sourceforge.net/#home
PHP QR Code - QR code generator, an LGPL PHP library
PHP QR code is Open Source (LGPL) generator for 2-D QR barcode, supports PNG export of code and TCPDF bindings ...
PHP QR code is Open Source (LGPL) generator for 2-D QR barcode, supports PNG export of code and TCPDF bindings ...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 60.249.38.187
推 :感謝回應 我想請問第二種方法中 哪個套件用起來會比較快?1F 05/21 13:53
→ :原文中提到的 Zxing vs PHP QRcode
→ :一個是外部執行java 一個是php class 要怎麼知道用誰好??
→ :原文中提到的 Zxing vs PHP QRcode
→ :一個是外部執行java 一個是php class 要怎麼知道用誰好??
--
※ 同主題文章:
05-21 11:27 ■ [請益] QR code image generator and decoder
● 05-21 13:21 ■ Re: [請益] QR code image generator and decoder
※ 看板: dinos 文章推薦值: 0 目前人氣: 0 累積人氣: 186
回列表(←)
分享