Re: Passing Values between C App and PHP
| From: | Per Jessen | Date: | Mon, 22 Jun 2009 08:45:34 +0000 |
| Subject: | Re: Passing Values between C App and PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294403@lists.php.net to get a copy of this message | ||
Tobias Krieger wrote:
> This would be a nice and fast solution, but unfortunatelly, it's like
> that the C programm needs to surveilance the hardware all the time
> (controlling values,...) hence, it would run more as a "daemon".
>
Depending your skill-levels with C, there is not much to it. Here is
some fairly simple code I use for a daemon that controls an IOM142
(google it) board via the serial port.
http://jessen.ch/files/fridged.tar.gz
It's very much "send two-byte command", then "receive multi-byte
response", but it also responds to simple http-style requests and I
call it from php to produce this page: http://jessen.ch/refrigeration/
(in dire need up an update).
/Per
--
Per Jessen, Zürich (14.4°C)