$dbm = dbmopen ("lastseen", "w"); if (dbmexists ($dbm, $userid)) {$last_seen = dbmfetch ($dbm, $userid);} else {dbminsert ($dbm, $userid, time());} do_stuff(); dbmreplace ($dbm, $userid, time()); dbmclose ($dbm);
?php $dbm = dbmopen( "dernier", "w"); if (dbmexists($dbm, $userid)) {$last_seen = dbmfetch($dbm, $userid);} else {dbminsert($dbm, $userid, time());} faire_quelquechose(); dbmreplace($dbm, $userid, time()); dbmclose($dbm);?