PHP code example of ikarus / sps-server

1. Go to this page and download the library: Download ikarus/sps-server library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ikarus / sps-server example snippets



use Ikarus\SPS\CyclicEngine;
use Ikarus\SPS\Server\Cyclic\ServerPlugin;

$sps = new CyclicEngine(2, 'Test SPS');
// add the plugins your need to run properly

$sps->addPlugin( new ServerPlugin('192.168.1.100', 8686) );
$sps->run();


use Ikarus\SPS\TriggeredEngine;
use Ikarus\SPS\Server\Trigger\ServerPlugin;

$sps = new TriggeredEngine('Test SPS');
// add the plugins your need to run properly

$sps->addPlugin( new ServerPlugin('192.168.1.100', 8686) );
// or local unix server
$sps->addPlugin( new ServerPlugin('/tmp/example-sps.sock') );
$sps->run();