erickdewa/qr-render

1.0.0 2023-06-30 07:42 UTC

This package is not auto-updated.

Last update: 2024-12-28 13:29:26 UTC


README

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