PHP code example of emartech / session-validator-client

1. Go to this page and download the library: Download emartech/session-validator-client 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/ */

    

emartech / session-validator-client example snippets


$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');

var_dump($client->isValid('msid'));

$client = Client::create('http://session-validator-web.security');

var_dump($client->isValid('msid'));

$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');

var_dump($client->filterInvalid(['msid1', 'msid2']));

$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');
$cachedClient = CachedClient::create($client);

var_dump($cachedClient->isValid('msid'));

use Monolog\Logger;

$client = Client::create('https://session-validator.gservice.emarsys.net', 'escher_key', 'escher_secret');
$client->setLogger(new Logger('name'));