QR Code


https://reeteshghimire.com.np/2020/03/10/generate-qr-code-using-php-library/


According to Wikipedia, QR code (Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed in 1994 for the automotive industry in Japan. A barcode is a machine-readable optical label that contains information about the item to which it is attached. In practice, QR codes often contain data for a locator, identifier, or tracker that points to a website or application. A QR code uses four standardized encoding modes (numeric, alphanumeric, byte/binary, and kanji) to store data efficiently; extensions may also be used.

Installation

Install endroid/qr-code library using composer
  1. $ composer require endroid/qr-code
GitHub Link Here : QR Code Generator
First Download the library and then create a index.php file with the following code in it:
  1. <?php
  2. include('vendor/autoload.php');
  3. use Endroid\QrCode\QrCode;
  4. $qrCode = new QrCode('http://letzcricket.com');
  5. header('Content-Type: '.$qrCode->getContentType());
  6. echo $qrCode->writeString();

Comments

Popular posts from this blog

Create a RESTful API using PHP, My-sql and Slim-Framework

DeltaPi softwares

How to prevent form resubmission when page is refreshed (F5 / CTRL+R)