SimpleOpenKeyVal is a project mainly written in ..., it's free.
A simple PHP library to interface with OpenKeyval.org
SimpleOpenKeyVal is a PHP library to interface with OpenKeyval.org, which is a service for easily storing and retrieving key/value pairs via HTTP.
require_once('SimpleOpenKeyVal.php');
$openKeyVal = new SimpleOpenKeyVal();
$key = 'foobar-name';
$res = $openKeyVal->set($key, 'John Doe');
$val = $kv->get($key);
$res = $kv->del($key);
To cache retrieved values locally, set the cacheTime
argument while creating SimpleOpenKeyVal
object. The values will be cached upto cacheTime
seconds.
require_once('SimpleOpenKeyVal.php');
$openKeyVal = new SimpleOpenKeyVal($cacheTime=60);
$key = 'foobar-name';
$res = $openKeyVal->set($key, 'John Doe');
$val = $kv->get($key);
$res = $kv->del($key);