Add some different xPL implementations done by Telldus

This commit is contained in:
Micke Prag 2012-05-29 14:18:28 +02:00
parent deebf2045e
commit d4b46c71ec
21 changed files with 2285 additions and 0 deletions

21
xpl/phpxpl/example.php Normal file
View file

@ -0,0 +1,21 @@
<?php
require_once 'xpllighting.class.php';
$xplinstance = new XPLLighting('192.168.0.50');
$running = true;
declare(ticks = 1) {
pcntl_signal( SIGINT, 'signalHandler' );
while($running) {
if ($xplinstance->doEvents()) {
usleep(100);
}
}
$xplinstance->detach();
}
function signalHandler() {
global $running;
$running = false;
}