Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eusonlito/cookie

Simple Cookie Interface with compress option
https://github.com/eusonlito/cookie

Last synced: 6 days ago
JSON representation

Simple Cookie Interface with compress option

Awesome Lists containing this project

README

        

Cookie
=====

This script works as simple cookie interface with compress option

You can store different data type into cookies.

Usage
--------
setSettings(array(
'name' => 'language'
));

$language = $Cookie->get();

if (!$language) {
$Cookie->set('en');
}

# Change to cookie data and set a new global expire
$Cookie->setSettings(array(
'name' => 'data',
'expire' => 3600
));

$data = $Cookie->get();

if (!$data) {
$Cookie->set(array(
'user' => $user,
'email' => $mail,
'last_login' => $last_login
));
}