|
|
%!s(int64=4) %!d(string=hai) anos | |
|---|---|---|
| .github | %!s(int64=4) %!d(string=hai) anos | |
| .idea | %!s(int64=5) %!d(string=hai) anos | |
| .phan | %!s(int64=4) %!d(string=hai) anos | |
| docs | %!s(int64=5) %!d(string=hai) anos | |
| examples | %!s(int64=4) %!d(string=hai) anos | |
| public | %!s(int64=4) %!d(string=hai) anos | |
| src | %!s(int64=4) %!d(string=hai) anos | |
| tests | %!s(int64=4) %!d(string=hai) anos | |
| .editorconfig | %!s(int64=4) %!d(string=hai) anos | |
| .gitignore | %!s(int64=5) %!d(string=hai) anos | |
| .scrutinizer.yml | %!s(int64=5) %!d(string=hai) anos | |
| .travis.yml | %!s(int64=5) %!d(string=hai) anos | |
| LICENSE | %!s(int64=7) %!d(string=hai) anos | |
| NOTICE | %!s(int64=5) %!d(string=hai) anos | |
| README.md | %!s(int64=4) %!d(string=hai) anos | |
| composer.json | %!s(int64=4) %!d(string=hai) anos | |
| phpdoc.xml | %!s(int64=5) %!d(string=hai) anos | |
| phpunit.xml | %!s(int64=5) %!d(string=hai) anos |
A PHP 7.4+ QR Code library based on the implementation by Kazuhiko Arase, namespaced, cleaned up, improved and other stuff.
See the wiki for advanced documentation. An API documentation created with phpDocumentor can be found at https://chillerlan.github.io/php-qrcode/ (WIP).
ext-mbstringext-json, ext-gdext-imagick with ImageMagick installedsetasign/fpdf for the PDF output modulerequires composer
via terminal: composer require chillerlan/php-qrcode
composer.json
{
"require": {
"php": "^7.4",
"chillerlan/php-qrcode": "dev-main"
}
}
Note: replace dev-main with a version constraint, e.g. ^4.3 - see releases for valid versions.
For PHP version ...
^4.3^3.3^2.0 (PHP 7.0 and 7.1 are EOL!)^1.0 (please let PHP 5 die!)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 on the wiki.
ga_loginwp-two-factor-authsimple-2faHi, please check out my other projects that are way cooler than qrcodes!
I don't take responsibility for molten CPUs, misled applications, failed log-ins etc.. Use at your own risk!
Parts of this code are ported to php from the ZXing project and licensed under the Apache License, Version 2.0.
The word "QR Code" is registered trademark of DENSO WAVE INCORPORATED
http://www.denso-wave.com/qrcode/faqpatent-e.html