PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.25.5
Last Build: August 06, 2019 13:23pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
file
graph
html
mail
math
misc
mobile
script
string
system
time
psBDB_readKey()
Read a key entry


Description:

This will read the vale for a key entry from a Berkeley DB file



Usage:

psBDB_readKey($dbFile,$key);
$dbFile = file name of the db file
$key = key name



Example:


$data = psBDB_readKey("/tmp/people.db","mb0005");





Code:

// this reads the value for a key
function psBDB_readKey($dbFile,$key)
{
$db = dba_open($dbFile, "cl" ,"db4");
if ($db !== false)
{
$res = dba_fetch($key, $db);
dba_close($db);
}
return $res;
}



Changlelog:

05-09-2019 v2.24 function added

And a shot out to:

PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site