It is actually not that complicated.
All bar code readers do is read data from the bar code itself and transfer it as a POST.
Create a form(html) with one field on it(input type="text"). Click inside the field(or make it Autofocus with JS). Then Read barcode with the device. The form will be Autosubmited with the value encoded into barcode.
Catch the value on the server-side(PHP), from there sky is the limit. There are libraries that will generate Barcore for you(barcode -think of it as a font readable by machine). There is a Google Java library that generates barcodes(free).
Hope this helps.