An open API service indexing awesome lists of open source software.

https://github.com/technicalguru/php-qrcode

A composer-compatible fork of deltalab's tcpdf lightweight QR Code generator
https://github.com/technicalguru/php-qrcode

Last synced: over 1 year ago
JSON representation

A composer-compatible fork of deltalab's tcpdf lightweight QR Code generator

Awesome Lists containing this project

README

          

# technicalguru/qrcode
This is PHP implementation of QR Code 2-D barcode generator. It is pure-php
LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi.
This fork was restructured to work in a special namespace and with composer.

# LICENSE
This project is licensed under [GNU LGPL 3.0](LICENSE.md).

# INSTALLATION AND USAGE

## By Composer

```
composer install technicalguru/qrcode
```

## By Package Download
You can download the source code packages from [GitHub Release Page](https://github.com/technicalguru/php-qrcode/releases)

# SIMPLE EXAMPLE USAGE

```
$text = 'This is an example QR code';
$file = __DIR__.'/example-qr.png';

\QR\QRcode::png($text, $file, QR_ECLEVEL_L, 8);

echo 'QR code saved at '.$file;

```

# ADVANCED EXAMPLE USAGE

```
back');

// user data
$filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png';
\QR\QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2);

} else {

// default data
echo 'You can provide data in GET parameter: like that


';
\QR\QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2);

}

// display generated file
echo '


';

// config form
echo '
Data:  
ECC: 
L - smallest
M
Q
H - best
 
Size: ';

for ($i=1; $i<=10; $i++) {
echo ''.$i.'';
}

echo ' 


';

```

# CONTRIBUTION
Report a bug, request an enhancement or pull request at the [GitHub Issue Tracker](https://github.com/technicalguru/php-qrcode/issues).
Fell free to contact me via e-mail (deltalab at poczta dot fm) or using
folowing project pages:

# ACKNOWLEDGMENTS

Based on phpqrcode at SourceForge by Dominik Dzienia:

* [https://sourceforge.net/projects/phpqrcode/]()
* [https://phpqrcode.sourceforge.net/]()

Based on C libqrencode library (ver. 3.1.1)
Copyright (C) 2006-2010 by Kentaro Fukuchi
http://megaui.net/fukuchi/works/qrencode/index.en.html

QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other
countries.

Reed-Solomon code encoder is written by Phil Karn, KA9Q.
Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q