barcode reading

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

barcode reading

Post by aceconcepts »

Hi,

Does anyone know anything about barcode reading?

My objective is to be able to read a barcode and retrieve related data from a database.

Thanks.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

http://www.ashberg.de/php-barcode/

might be a start, for reading them however I think you'll def. need some hardware interaction ;)
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

Thanks for your reply.

I've already visited that site - very good.

I was wondering how I would go about "getting" the barcode value and using it to query a database (assuming I have the hardware).
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

That is a cool little application. Did you see the part where you can upload in image of a barcode and it reads the data on it? That was really cool.
User avatar
iknownothing
Forum Contributor
Posts: 337
Joined: Sun Dec 17, 2006 11:53 pm
Location: Sunshine Coast, Australia

Post by iknownothing »

aceconcepts wrote:I was wondering how I would go about "getting" the barcode value and using it to query a database (assuming I have the hardware).
I would suggest something like a unique id, of maybe 6 numbers being inputted into the database on sign-up. Then perhaps use that application posted above for the image creation on request (UPC looks OK). That way, everything relating to PHP, will use the 6 digit ID, and only the barcode scanner will read the image (which then, essentially is converting the image back into the number anyway).

I would wait until you get the hardware until you (obviously talk to the salesman about what you want, hopefully he/she has half a brain) worry about querying the database, as I'd assume that the number if what would come from the hardware anyway.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

Yeah the upload app is very cool.

Thanks for the post iknownothing, I was thinking of doing something like a longer unique id when people sign up, thus keeping things "php-simple" :D .

I don't have the hardware yet but how does it work when you scan a barcode? How would one "get" the image scanned?

What I mean is how does the scanner communicate with a php script to retrieve the image/barcode?

I think i'm making sense

Thanks. :D
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Post by VladSun »

I am not sure that PHP is the best choice for doing this. Maybe C, Perl or other not so www oriented language.

Please, let me beeing excused for this suggestion :)
There are 10 types of people in this world, those who understand binary and those who don't
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

As far as I can remember (look into barcode readers, they have info on this) barcode scanners simply emulate keyboard strokes.

When you scan a barcode, relavent characters should be entered into the currently selected textbox. Which you can then POST to a PHP script. Not sure if reading a barcode from PHP is really nessecary.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I can confirm that hardware barcode readers do return a regular string with data ;) (like a keyboard as hockey mentionned) You'll probably find lots of barcode recognition software too..


(Even i was able to create a very, very, very basic Code39 scanner (using c#) in less than an afternoon)
Post Reply