PHP code example of nrwtaylor / stack-agent-thing

1. Go to this page and download the library: Download nrwtaylor/stack-agent-thing 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/ */

    

nrwtaylor / stack-agent-thing example snippets


    $thing = new Thing(null); // creates a UUID for a thing

    Show a Thing's UUID
    echo $thing->uuid; // display UUID

    Instantiate a Thing
    $thing->Create("from","to","test message");

    Run an agent on a Thing
    $agent = new Start($thing); // runs the Start agent 
shell 
sudo apt install php7.1-bcmath
sudo apt-get install php-bcmath
shell
sudo apt install php7.1-bcmath
sudo apt-get install php-bcmath
restart
shell
* * * * * cd /var/www/html/<site name> && /usr/bin/php -q /var/www/html/<site name>/agents/Cron.php >/dev/null 2>&1