PHP code example of zxing / qr-reader

1. Go to this page and download the library: Download zxing/qr-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/ */

    

zxing / qr-reader example snippets




$qrcode = new \Zxing\QrReader('./qr.png');  //图片路径
$text = $qrcode->text(); //返回识别后的文本
echo $text;

PHP >= 5.3
GD Library