PHP code example of stefanak-michal / thingsdb-php

1. Go to this page and download the library: Download stefanak-michal/thingsdb-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/ */

    

stefanak-michal / thingsdb-php example snippets


use ThingsDB\ThingsDB;

$thingsDB = new ThingsDB();
$result = $thingsDB->auth(); // returns true on success
$message = $thingsDB->query('@:stuff', '"Hello World!";'); // returns "Hello World!" 

use ThingsDB\ThingsDB;
$thingsDB = new ThingsDB('localhost:9200', 15, [
    'socket' => ['tcp_nodelay' => true],
    'ssl' => ['verify_peer' => true]
]);