libern/qr-code-reader

Simple PHP QR Code Reader / Decoder

v1.0.6 2017-06-02 12:56 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.3
  • GD Library