PHP code example of enceeper / enceeper-phpconf

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

    

enceeper / enceeper-phpconf example snippets




e key identifier and the password
$pw = 'ThisLittlePiggyWasHappyWithEncryption';
$id = 'fd925fdd94706d418cc3ddbe8bf46ce9';

// Connect to Redis
$redis = new Redis();
$redis->connect('127.0.0.1', 6379, 2.0);

// Instanciate Enceeper and the cache
$enc = new Enceeper\Enceeper($pw, $id);
$cch = new Enceeper\RedisCache($redis, 'enceeper-conf', 5, $enc, Enceeper\AbstractCache::STRATEGY_BATCH_MODE);

// Get the configuration array
$conf = $cch->get();

//
// The code bellow will be called asynchronously by another script
//
//
//$cch->update();
//

//
// You can continue with your application logic
//