简体   繁体   中英

Reading barcode from webcam in PHP web application

Want to add following feature to my web application: To decode barcodes generated by this script . with webcam and use values in PHP web application.

Is that possible? if yes how?

Not with PHP, seeing as it is server side. But, you could accomplish this with java, javascript, or some other client side languages.

javascript (jQuery) webcam plugin

http://www.xarg.org/project/jquery-webcam-plugin/

EDIT -- how this would be done is to take the picture with javascript, and then send it back to the server to decode by PHP.

http://www.inliteresearch.com/homepage/support/kb_programming.html

I happened to come across a project where someone actually accomplished this in a pretty nice way using Javascript:

https://serratus.github.io/quaggaJS/

It only handles a few types of barcodes, but it may be a good starting point if you need the others. You can most likely have Javascript post these back to PHP using AJAX or have them update a form field to be submitted.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM