PHP code example of ashus / phpqrcode
1. Go to this page and download the library: Download ashus/phpqrcode library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ashus / phpqrcode example snippets
\PHPQRCode\QRcode::png(
text: 'Test',
outfile: '/tmp/qrcode.png',
level: \PHPQRCode\Constants::QR_ECLEVEL_L,
size: 4,
margin: 2,
);
$png = \PHPQRCode\QRcode::pngString(
text: 'Test',
level: \PHPQRCode\Constants::QR_ECLEVEL_L,
size: 4,
margin: 2,
);