Generating and reading barcode

heron picture heron · Oct 25, 2011 · Viewed 57.7k times · Source

I've built an e-shopping website for a big company which has country offices.

What i want to do is the following

  1. Generate barcode via PHP before sending package to country offices of company
  2. When the item will be arrived to country office, workers will login to their account, scan this barcode via barcode reader (which located on package) and website will automatically "approve" that item received.

Is it possible only with web interface? I mean without any local application. How to do that? PLease explain.

Answer

sled picture sled · Oct 25, 2011

so here is an approach that could work for you:

You need to put a record in a database like:

package_id |    name      |   status

  1234        My Package      shipped

Generate a barcode which contains the package_id, you have to decide what kind of barcode you want to use. You could also use a data matrix. Then you create the bar code as image so that you can print it. Data Matrix is very good for large custom data.

Print the bar code, put it on your package

The package arrives at the office, the user logs on to your website, clicks on "Confirm Package Received" or whatever. Then there is a text-field, he focuses the text-field, scans the barcode/data matrix and your package ID "1234" will appear in the text-field

Submit the form, lookup the entry in the database, change it to:

 package_id |     name      |   status
  1234         My Package      delivered

A Tip If you use a QR Code it can be read by many mobile phones, so you don't need a real bar code scanner. You could write an app that reads the bar code and sends the package_id to your server.