PHP code example of leon2012 / goconfd-php-sdk
1. Go to this page and download the library: Download leon2012/goconfd-php-sdk 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/ */
leon2012 / goconfd-php-sdk example snippets
use goconfd\phpsdk\Goconfd;
$config = [
'save_path' => '/tmp/goconfd',
'key_prefix' => 'develop.activity',
'save_type' => 2,
'file_ext' => '',
'agent_url' => 'http://127.0.0.1:3001/',
];
$sdk = new Goconfd($config);
$kv = $sdk->get("develop.activity.k1");
if ($kv) {
echo $kv->getValue();
}