You cannot read the barcode using PHP, because it's a serverside language, but the input would be client-side.
What you could do, is write a little program which gets the barcode and puts it into your browser textbox or sends it via GET / POST to your php script.