Download the PHP package zhangchunsheng/php-qrcode without Composer
On this page you can find all versions of the php package zhangchunsheng/php-qrcode. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zhangchunsheng/php-qrcode
More information about zhangchunsheng/php-qrcode
Files in zhangchunsheng/php-qrcode
Package php-qrcode
Short Description php qrcode is qrcode utils written in PHP.
License Apache-2.0
Homepage https://github.com/zhangchunsheng/php-qrcode
Informations about the package php-qrcode
This is PHP 7+ only implementation of QR Code 2-D barcode generator.
Based on:
http://sourceforge.net/projects/phpqrcode/
By Dominik Dzienia
I was looking for a QR implementation for the pChart fork and came across this one.
It was either refactor Dominik's or use Chillerlan's (https://github.com/chillerlan/php-qrcode)
This fork is not a drop in replacement.
My code is four times smaller and two times faster
(much much faster than the Chillerlan's implementation)
Usage:
Possible hints: "Numeric", "Alphanumeric", "Byte", "Kanji"
- Single line:
(new QRCode([
'level' => $error_correction_level,
'size' => $max_module_size,
'margin' => $white_frame_size
]))->encode('https://github.com/zhangchunsheng/php-qrcode')->toFile("example.QRcode.png");
-
Or:
$QRCode = new QRCode(['level' => "Q", 'size' => 10, 'margin' => 4]);
$QRCode->encode('https://github.com/zhangchunsheng/php-qrcode', $hint); -
Dump the matrix:
echo json_encode($QRCode->toArray()); -
Load a matrix:
$QRCode->fromArray($matix); -
Dump base64 encoded PNG:
$QRCode->toBase64(); -
Create ASCII:
$QRCode->toASCII(); -
Output to file:
$QRCode->toFile("example.QRcode.png");
$QRCode->toFile("example.QRcode.svg");
$QRCode->toFile("example.QRcode.jpg"); - Add HTTP headers:
$QRCode->forWeb("PNG");
$QRCode->forWeb("SVG");
$QRCode->forWeb("JPG", $quality = 90);