1. Go to this page and download the library: Download globus-studio/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/ */
globus-studio / phpqrcode example snippets
use GlobusStudio\QRCode\QRCode;
// SVG string
$svg = QRCode::svg('https://example.com');
// PNG as data URI (II art
echo QRCode::string('https://example.com');
// Raw boolean matrix
$matrix = QRCode::matrix('https://example.com');
// ~180ms per QR (auto mask selection)
$svg = QRCode::svg($data);
// ~11ms per QR (fixed mask, 17x faster)
$svg = QRCode::svg($data, ['mask' => 0]);
use GlobusStudio\QRCode\QRCode;
use GlobusStudio\QRCode\ErrorCorrection\ErrorCorrectionLevel;
use GlobusStudio\QRCode\Renderer\SvgRenderer;
$qr = new QRCode('https://example.com', ErrorCorrectionLevel::H);
$svg = $qr->render(new SvgRenderer(['size' => 6]));
$matrix = $qr->getMatrix();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.