PHP code example of khelechy / argus-php
1. Go to this page and download the library: Download khelechy/argus-php 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/ */
khelechy / argus-php example snippets
use Khelechy\Argus\Argus;
class TestSub{
public function subscribeToArgus($argusData){
echo $argusData->Action . "\n";
echo $argusData->ActionDescription . "\n";
echo $argusData->Name . "\n";
echo $argusData->Timestamp . "\n";
}
}
$sub = new TestSub();
$argus = new Argus("testuser", "testpassword"); // Optionally you can pass the host and port, and auth credentials inclusive.
$argus->subscribe($sub, 'subscribeToArgus');
$argus->connect();