Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 315
Tural Ali Avatar asked Jan 30 '12 03:01

Tural Ali


2 Answers

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

like image 106
elimirks Avatar answered Sep 23 '22 04:09

elimirks


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.

like image 27
Schuyler Cumbie Avatar answered Sep 23 '22 04:09

Schuyler Cumbie