1. Go to this page and download the library: Download s00d/rocksdb-client-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/ */
s00d / rocksdb-client-php example snippets
'providers' => [
// Other Service Providers
s00d\RocksDB\RocksDBServiceProvider::class,
],
'aliases' => [
// Other Facades
'RocksDB' => s00d\RocksDB\Facades\RocksDB::class,
],
use RocksDB;
// Put a value
RocksDB::put('key', 'value');
// Get a value
$value = RocksDB::get('key');
// Delete a key
RocksDB::delete('key');
// Other available methods...
use s00d\RocksDB\RocksDBClient;
$client = new RocksDBClient('127.0.0.1', 12345);
// If you have a token
// $client = new RocksDBClient('127.0.0.1', 12345, 'your-token');
// Put a value
$client->put('key', 'value');
// Get a value
$value = $client->get('key');
// Delete a key
$client->delete('key');
// Other available methods...