PHP code example of coercive / session
1. Go to this page and download the library: Download coercive/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/ */
coercive / session example snippets
use Coercive\Security\Session\Config;
use Coercive\Security\Session\Session;
# Set your config options
$Config = new Config();
$Config->setAutoStartSession(true);
$Config->setSessionDomain('.mywebsite.com');
//...
# Get your session handler
$Session = new Session($Config);
# And use ...
if($Session->isActive()) {
// do something
}