How can you read QR Codes in PHP?

前端 未结 5 866
难免孤独
难免孤独 2020-12-23 00:07

Is there a plain PHP implementation for decoding QR codes?

I have a faux-smartphone. One of those phones that parades as a smartphone but that I can\'t download any

相关标签:
5条回答
  • 2020-12-23 00:23

    Here is a good example & you can generate online direct QR code too...

    there is also php library to implement QR code in your project.

    http://phpqrcode.sourceforge.net/

    0 讨论(0)
  • 2020-12-23 00:26

    To decode your QR code you have to upload image of QR code and it will show you text inside that code image.

    http://www.phpgang.com/how-to-decode-qr-code_344.html

    Very easy to do tutorial I hope it helps.

    0 讨论(0)
  • 2020-12-23 00:32

    If you have the possibility to use a phpextension, php-zbarcode at https://github.com/mkoppanen/php-zbarcode can read qrcodes. It's a wrapper for ZBar from http://zbar.sourceforge.net, which in turn is a LGPL C library for decoding barcodes.

    0 讨论(0)
  • 2020-12-23 00:38

    There is only one pure PHP QR code decoder. It's working with GD library, but can use also ImageMagick. This PHP QR code reader is ported from ZXing.

    https://github.com/khanamiryan/php-qrcode-detector-decoder

    0 讨论(0)
  • 2020-12-23 00:39

    I'm not aware of any pure php decoder. Decoding images like this is pretty processor intensive and doing it in a purely interpreted language is challenging.

    zxing (http://code.google.com/p/zxing/) provides a decoder implementation in both Java and C++. In theory, it should be possible to link the C++ library as a php extension, though I don't know anything of the mechanics of that. I've done it for Ruby ...

    Moreover, zxing does have an online decoder at http://zxing.org/w/decode.jspx. My thinking is that from PHP you can take the image and post it to the webservice and retrieve the decoded data. I don't know the mechanics of making remote web service calls from PHP and how different hosting environments might limit that, though, but it seems reasonable?

    0 讨论(0)
提交回复
热议问题