Hi, first post here, anyways\s here's the deal...

My dad owns a clothing company and we have 3 local shops. He is going to be buying a POS system that uses Windows XP and a barcode scanner. I don't really know anything much about barcodes, but the local cd store uses a barcode scanner which, as I hypothesysed (i know, spelled wrong), simply scans the image and converts it to text. Now, we have a 24/7 ADSL connection, so we can keep a page open to a php application. What I'm wondering, is if there's a way for php to detect the scanned text alongside the accounting program installed with the system, then handle it from there.

Another alternative is to write the information into a flat text file, and then upload it to PHP, parse it, and handle it from there.

Is that doable in PHP? For the alternative choice would i need to resort to C++/Java?

Thanks for any help

I am not an expert in this field, but the way many barcode scanners work is simply as a keyboard interrupt. That is, they decode the code, and enter the code text AS IF it was typed using the keyboard. So for example, you could have a PHP web page, and as long as your input field was in focus, when you scan the barcode, the code would be entered into your web page form.

Your PHP app does not need to be aware of the scanner. The scanner just does standard output.

I create barcodes for our MFG plant all day long..

Its very simple.

We use intermec printers & 139 barcode standard.

All you need to do is build a flat text file with all the barcode commands

ie; STX ,ETX etc etc

and then fire the file to the printer and presto a barcode will come out..

Example would be something like this for Intermec 3400D:

q12 = chr(2) + "E1;" + chr(3).
display q12 skip.
q13 = chr(2) + "E2;" + chr(3).
display q13 skip.
q14 = chr(2) + "E3;" + chr(3).
display q14 skip.
q15 = chr(2) + "E4;" + chr(3).
display q15 skip.
q16 = chr(2) + "E5;" + chr(3).
display q16 skip.
q17 = chr(2) + "E6;" + chr(3).
display q17 skip.
q18 = chr(2) + "E7;" + chr(3).

Thats not PHP formated.. But just trying to show you how to build the file.

If you need me to buidl one for you into total PHP send me specs of printer and sample data and I will.

here is where we actually start the Barcode:

n3 = chr(2) + "H00, BLANK;o0008,0000;f0;h001;w003;c2;r0;b01;" + chr(3).
display n3 skip.
n4 = chr(2) + "d3, ;D39;" + chr(3).
display n4 skip.
n5 = chr(2) + "B01, ;o0000,0060;c0,0;f0;h055;w001;r1;i2;d3,".
n5 = n5 + "123456+ ";pP;D39;" + chr(3).


B01 == barcode 1

H00 == Human Readable Field

o0008,0000;f0;h001;w003;c2;r0;b01
X, Y Poitions, Height,Width,Font Type, Where does the Human Ereadbale belong?

H00 will be displayed wherever B01 is in this case.

I hope this helped.

tat means we need to program a text file for it to read? can it just read to the notepad or something like tat? or can we get the scanner input directly into PHP code?

IN that case can we use our own barcode........

I create barcodes for our MFG plant all day long..

Its very simple.

We use intermec printers & 139 barcode standard.

All you need to do is build a flat text file with all the barcode commands

ie; STX ,ETX etc etc

and then fire the file to the printer and presto a barcode will come out..

Example would be something like this for Intermec 3400D:

q12 = chr(2) + "E1;" + chr(3).
display q12 skip.
q13 = chr(2) + "E2;" + chr(3).
display q13 skip.
q14 = chr(2) + "E3;" + chr(3).
display q14 skip.
q15 = chr(2) + "E4;" + chr(3).
display q15 skip.
q16 = chr(2) + "E5;" + chr(3).
display q16 skip.
q17 = chr(2) + "E6;" + chr(3).
display q17 skip.
q18 = chr(2) + "E7;" + chr(3).

Thats not PHP formated.. But just trying to show you how to build the file.

If you need me to buidl one for you into total PHP send me specs of printer and sample data and I will.

here is where we actually start the Barcode:

n3 = chr(2) + "H00, BLANK;o0008,0000;f0;h001;w003;c2;r0;b01;" + chr(3).
display n3 skip.
n4 = chr(2) + "d3, ;D39;" + chr(3).
display n4 skip.
n5 = chr(2) + "B01, ;o0000,0060;c0,0;f0;h055;w001;r1;i2;d3,".
n5 = n5 + "123456+ ";pP;D39;" + chr(3).


B01 == barcode 1

H00 == Human Readable Field

o0008,0000;f0;h001;w003;c2;r0;b01
X, Y Poitions, Height,Width,Font Type, Where does the Human Ereadbale belong?

H00 will be displayed wherever B01 is in this case.

I hope this helped.

It's a weird idea for me to build a POS system using PHP. In fact, there are many things inconvenient to accomplish using PHP (i.e printing the invoice). Why dont you build it using Delphi/ .NET, and send/retrieve data you need via web service?

This article has been dead for over six months. Start a new discussion instead.