Last active
August 29, 2015 14:18
-
-
Save jfortier-haptiq/abe4c45044db07412612 to your computer and use it in GitHub Desktop.
GN21Cookie Managment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'gn21cookie.php'; | |
//Encrypt and set the cookie | |
\GN21Session::encrypt( array( | |
'networkId'=>123, | |
'membershipLevel'=>'gold', | |
'clubId'=>2, | |
), true); | |
//Grabs content from cookie and decrypts it: | |
$fields = \GN21Session::decrypt(); | |
//keep session alive - keeps renewing expiry | |
\GN21Session::keepalive(); | |
//kill the session | |
\GN21Session::expire(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment