PHP code example of linshunwei / qrcode-reader

1. Go to this page and download the library: Download linshunwei/qrcode-reader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

linshunwei / qrcode-reader example snippets


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

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