PHP code example of esyede / tiny-qrcode

1. Go to this page and download the library: Download esyede/tiny-qrcode 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/ */

    

esyede / tiny-qrcode example snippets





$data = 'https://github.com/esyede/tiny-qrcode';

$qr = new \Esyede\TinyQRCode\TinyQRCode($data);
$qr->display();

$data = 'https://github.com/esyede/tiny-qrcode';

$qr = new \Esyede\TinyQRCode\TinyQRCode($data);
$qr->store('path/to/store/qr.png');

$data = 'https://github.com/esyede/tiny-qrcode';
$options = ['errorCorrectionLevel' => 'H'];

$qr = new \Esyede\TinyQRCode\TinyQRCode($data, $options);
$qr->display();

$data = 'https://github.com/esyede/tiny-qrcode';
$options = ['imageSize' => 30];

$qr = new \Esyede\TinyQRCode\TinyQRCode($data, $options);
$qr->display();

$data = 'https://github.com/esyede/tiny-qrcode';
$options = ['version' => 5]; // range: 1 - 40

$qr = new \Esyede\TinyQRCode\TinyQRCode($data, $options);
$qr->display();