Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/eusonlito/cookie
- Owner: eusonlito
- Created: 2012-08-22T11:49:18.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-05T11:47:12.000Z (about 12 years ago)
- Last Synced: 2024-10-18T04:23:05.135Z (26 days ago)
- Language: PHP
- Size: 105 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
));
}