Add some different xPL implementations done by Telldus
This commit is contained in:
parent
deebf2045e
commit
d4b46c71ec
21 changed files with 2285 additions and 0 deletions
21
xpl/phpxpl/example.php
Normal file
21
xpl/phpxpl/example.php
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue