Access Computer devices with php-gtk

View: New views
3 Messages — Rating Filter:   Alert me  

Access Computer devices with php-gtk

by morraine :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello is it possible to access computer devices with php-gtk? i want to create a simple ePOS system to process orders on a Linux or Windows based computer till system. it will be a standard computer with a cash draw, a barcode reader, a Receipt Printer and a credit card machine.

can i possibly get data from the barcode and credit card machine then also send a message to the cashdraw to open and printer to print a receipt on sale complete with php-gtk. if i can't do it with pure php can i use another language as a proxy between the device and php to pass the variables into and out from the php-gtk application?

if i cant natively communicate with devices could i then use the php-java-brige and create a small java program to act as the proxy between the devices and php-gtk?

your advice and input on this would be very grateful thank you.

Re: Access Computer devices with php-gtk

by Bernard Fouché :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

There is no trouble on a Linux box to use PHP scripts to open devices
like /dev/ttyUSB0 or whatever other special file you would need. (I
dunno about Windows)

You just have to be aware of file permissions (and the way you open
files, i.e. 'binary' access or not), and if these permissions are okay
according to the user running the PHP script, then you can access any
peripheral like you would do in C.

Using GTK has no influence regarding accesses to special files.

A Bar code reader will be even more transparent since it will generally
appear as some type of keyboard and be managed by the keyboard driver.

Regards,

    Bernard

morraine wrote:

> Hello is it possible to access computer devices with php-gtk? i want to
> create a simple ePOS system to process orders on a Linux or Windows based
> computer till system. it will be a standard computer with a cash draw, a
> barcode reader, a Receipt Printer and a credit card machine.
>
> can i possibly get data from the barcode and credit card machine then also
> send a message to the cashdraw to open and printer to print a receipt on
> sale complete with php-gtk. if i can't do it with pure php can i use another
> language as a proxy between the device and php to pass the variables into
> and out from the php-gtk application?
>
> if i cant natively communicate with devices could i then use the
> http://php-java-bridge.sourceforge.net/doc/ php-java-brige  and create a
> small java program to act as the proxy between the devices and php-gtk?
>
> your advice and input on this would be very grateful thank you.
>  


--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Access Computer devices with php-gtk

by kksou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

morraine wrote:
Hello is it possible to access computer devices with php-gtk? i want to create a simple ePOS system to process orders on a Linux or Windows based computer till system. it will be a standard computer with a cash draw, a barcode reader, a Receipt Printer and a credit card machine.
Hi,

I've written some sample codes that show you how to interface to some of the devices you've mentioned above:

How to interface to receipt printer in a point of sale system?
http://www.kksou.com/php-gtk2/articles/interface-to-receipt-printer-in-a-point-of-sale-system.php

How to kick open the cash drawer of a point of sale system?
http://www.kksou.com/php-gtk2/articles/kick-open-the-cash-drawer-of-a-point-of-sale-system.php

How to print barcode label - Part 1 - EAN13 barcodes
http://www.kksou.com/php-gtk2/articles/print-barcode-label---Part-1---EAN13-barcodes.php

I've also written a Quick Reference for ESC/POS Commands
http://www.kksou.com/php-gtk2/References/Barcode-printing-on-receipt-printer-using-the-ESC/POS-Commands.php

Regards,
/kksou