PHP

HOW TO GENERATE QR CODE IN PHP

After installing Composer, open command line, navigate to project folder, and run "composer require endroid/qr-code".

Composer will automatically downlaod the latest version into the vendor/ folder.

QR CODE LIBRARY

01

USE QR CODE LIBRARY require "vendor/autoload.php"; use Endroid\QrCode\QrCode; use Endroid\QrCode\Writer\ PngWriter;

QR CODE GENERATION

02

SAVE TO FILE ON SERVER $writer = new PngWriter(); $result = $writer->write($qr); $result->saveToFile("qr.png");

GENERATE QR CODE $qr = QrCode::create("https://code-boxx.com");