[Fwd: Re: Re: How could I make the browser to send a command to a cash register...]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just realized I forgot to CC: the original list on my reply below.

I also have since realized that using the solution in my reply below,
the SERVER *COULD* cause the register to open.  On the server side, a
script that connects to HTTP://ip-of-register-to-open:secret-portnum
would cause the register to open as desired.

So, this is just a simple modification of my original reply.  You still
write a socket listener app. that runs on the workstation where the
register is connected, that is capable of opening the register on
demand.  Then, when the user using the browser does something to open
the cash drawer, you run a script on the server that connects to
REMOTE_ADDRESS:secret-port which makes the "listener" app. open the cash
drawer.  (Okay, so it's technically client based, but server driven.)

A similar tool (the same listener app, even) could be used to send text
to the workstation-attached receipt printer.  It could be setup such
that any text received on the port it's listening to, is simply echoed
to the printer.  So, now the server generates what needs sent to the
printer and prints it by connecting (from the server) to the listener
app., followed by a connection to the port that causes the drawer to open.

-- Mitch


-------- Original Message --------
Subject: Re:   Re: How could I make the browser to send a command
to a cash register...
Date: Mon, 11 Sep 2006 10:42:37 -0500
From: Mitch Miller <mitch@xxxxxxxxxxxx>
To: Man-wai Chang <toylet.toylet@xxxxxxxxx>
References: <ee14r5$ch6$1@xxxxxxxxxxxxx>
<3B.02.21785.2A914054@xxxxxxxxxxxx> <ee3vjd$dr5$1@xxxxxxxxxxxxx>

I think I'd be tempted to write a simple socket listener app., that
could listen on a TCP/IP port and when it makes a connection (and
optionally gets the right command), could open the register.

There are lots of examples of socket listener apps. done in Perl (check
Google), but the local app. would *not need* to be in Perl (that's just
one I've used personally).

Once the app. is running, simply connecting to
http://localhost:secret-portnum *could* be enough to make the app. open
the register (by sending the right command to the serial port).

Using this technique, any HTML that references
http://localhost:secret-portnum would open the register, regardless of
how the HTML is generated.

-- Mitch


Man-wai Chang wrote:
>>That 100% depends on how the cash register works.  Is it an NT cash
>>register, or an propitiatory one?  Is it rs232 or on a network?
>>Basically, find out how the cash register can be controlled, then make a
>>php script that can fire that control.
> 
> 
> Thanks.
> 
> It's a RS232 serial register. PHP, running at the server side, could
> talk to the hardware at the client side? Or is it ActiveX?
> 
> 

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux