In order to separate interface from the IR engine, I'll use a socket connection between them.
The interface will open a socket to the server and write the IR code string.
On the other side, the server loads the IR module and listen for IR codes from the socket. When received, the code is sent to the IR module and blasted !
Here's a simple PHP script that sends an IR code to the socket server :
$fd = fsockopen('192.168.1.20', '9494', $errno, $errstr, 30);
if ($fd) {
fwrite($fd, utf8_encode('0000 006C ... 0015 0E4A'));
}
This screenshot shows the debug output of the socket server running and intercepting this code.
The next step is the PHP client that will also store the codes in a database