I have a USB barcode scanner and would like to make a php based program to interface with it. How can I read from the USB port using php (Mac OSX).



You can't AFAIK.

Certainly not if the USB scanner is on a client machine rather than a server.
Moreover, I've never heard of an extension to do this.

If you merely wish to use the barcode scanner as input for a form, then you should surely have got drivers with the device that 'fool' the computer into thinking that it's a keyboard.

Ya, I was planning on only server side usage... I'll also look into that style of driver (I actually haven't got the scanner yet, it should be coming today).

Thanks for your help


Hello rudysplif,

Look on the next link, examples of a projet CueCat. On this How-to you have some scripts (perl, python, tcl, javascript, ...) for use scanner barcode. Without driver because it use the same communication that a keyboard.


I have some problem with my english language and not understand all about this resource :confused: