|
|
1 maand geleden | |
|---|---|---|
| .github | 1 maand geleden | |
| .idea | 6 maanden geleden | |
| .phan | 5 maanden geleden | |
| .phpdoc | 1 jaar geleden | |
| benchmark | 1 maand geleden | |
| docs | 1 maand geleden | |
| examples | 1 maand geleden | |
| src | 1 maand geleden | |
| tests | 1 maand geleden | |
| .editorconfig | 2 jaren geleden | |
| .gitattributes | 1 maand geleden | |
| .gitignore | 1 maand geleden | |
| .readthedocs.yml | 2 jaren geleden | |
| LICENSE-ASL-2.0 | 3 jaren geleden | |
| LICENSE-MIT | 3 jaren geleden | |
| NOTICE | 2 jaren geleden | |
| README.md | 1 maand geleden | |
| composer.json | 1 maand geleden | |
| phpbench.json | 1 jaar geleden | |
| phpcs.xml.dist | 6 maanden geleden | |
| phpdoc.xml.dist | 2 jaren geleden | |
| phpmd.xml.dist | 1 jaar geleden | |
| phpstan-baseline.neon | 1 maand geleden | |
| phpstan.dist.neon | 1 jaar geleden | |
| phpunit.xml.dist | 1 maand geleden |
A PHP QR Code generator based on the implementation by Kazuhiko Arase, namespaced, cleaned up, improved and other stuff.
It also features a QR Code reader based on a PHP port of the ZXing library.
Attention: there is now also a javascript port on NPM: @chillerlan/qrcode.
ext-mbstringext-gd for QRGdImage based outputext-imagick with ImageMagick installedext-fileinfo required by QRImagick outputsetasign/fpdf for the PDF output moduleintervention/image for alternative GD/ImageMagick outputFor the QR Code reader, either ext-gd or ext-imagick is required!
QROptions container is here: chillerlan/php-settings-containerbenchmark branchImportant: Please use the examples from the branch that matches your installed php-qrcode version (
v4.x,
v5.x,
dev-main
)!
The main (default) branch is the active development for future major versions, and it is most likely incompatible with the latest release versions.
See the installation guide for more info!
composer require chillerlan/php-qrcode
{
"require": {
"php": "^8.2",
"chillerlan/php-qrcode": "dev-main#<commit_hash>"
}
}
Note: replace dev-main with a version constraint, e.g. ^5.0 - see releases for valid versions.
We want to encode this URI for a mobile authenticator into a QRcode image:
$data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net';
// quick and simple:
echo '<img src="'.(new QRCode)->render($data).'" alt="QR Code" />';
Wait, what was that? Please again, slower! See Advanced usage in the manual. Also, have a look in the examples folder for some more usage examples.
I don't take responsibility for molten CPUs, misled applications, failed log-ins etc.. Use at your own risk!
The word "QR Code" is a registered trademark of DENSO WAVE INCORPORATED
https://www.qrcode.com/en/faq.html#patentH2Title