Serial communication has to be done fairly low level using Windows API's.
You can buy a wrapper component called ActiveComport (USB is just a much much faster RS232) here which gives you an interface you can manipulate in scripting languages.
I beleive on Linux it's simpler because everythings a file, so you just read and write your bits to the file that represents your USB port or device, if I find any leads in that direction I'll post them.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Any webpage cannot control your USB port, PHP is not just for web pages although that's where it is most commonly used. ActiveComport is a component that you will have to register with the windows registry on the machine on which you are executing your PHP script. I'm afraid I am not an authority on PHP as I have used it very little, and the site I gave does not mention PHP specifically. But if VBScript can use it I would be very surprised if PHP couldn't.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Ooh nice, I could find some uses for that, thinking send/receive SMS text messages thru PDA phone.
Choky,
I take it your cash drawer has a USB interface, does it not have any software with it, perhaps the vendor or manufacturer have a development KIT ?
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
Sorry, I'm really lost here.
Why do you want to mess about with low level stuff like communicating with a printer?
I take it this PHP POS software is going to run on a pc, on which the printer is installed as a device right?
so you just want to create a receipt document from your sales data and just put it in the print queue right ? let your OS worry about talking to the printer.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68