PHP code example of dframe / session
1. Go to this page and download the library: Download dframe/session 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/ */
dframe / session example snippets
$this->session = new \Dframe\Session\Session('name');
$session = new \Dframe\Session\Session('HashSaltRandomForSession');
$session->register(); // Set session_id and session_time - default 60
$session->authLogin(); // Return true/false if session is registered
$session->set($key, $value); // set $_SESSION[$key] = $value;
$session->get($key, $or = null); // get $_SESSION[$key];
$session->remove($key); // unset($_SESSION[$key]);
$session->end(); // session_destroy