libern/qr-code-reader

Simple PHP QR Code Reader / Decoder

v1.0.10 2020-12-10 06:12 UTC

This package is auto-updated.

Last update: 2024-09-10 13:58:05 UTC


README

Latest Version Software License Total Downloads

This is a PHP library to detect and decode QR-codes.
This is QR code reader that works without extensions.
This library supports PSR-4.
Based on QR code decoder / reader for PHP
Ported from ZXing library

Installation

Use Composer:

composer require libern/qr-code-reader

Usage

From image url

$QRCodeReader = new Libern\QRCodeReader\QRCodeReader();
$qrcode_text = $QRCodeReader->decode("path_to_qr_code");
echo $qrcode_text;

From image stream

$QRCodeReader = new Libern\QRCodeReader\QRCodeReader();
$qrcode_text = $QRCodeReader->decode(base64_encode("image_stream"));
echo $qrcode_text;

Requirements

  • PHP >= 5.6
  • GD Library