Login   Register  
PHP Classes

Session in Cookies: Session handler that stores data in cookies

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-11-25 (8 years ago) RSS 2.0 feedStarStarStarStar 64%Total: 2,645 All time: 1,335 This week: 1,070Up
Version License PHP version Categories  
cookie_session 1.0GNU General Public Lice...4User Management
Description Author  

This class implements a session handler that store session data in cookies.

The cookie data is encrypted with a secret server side key to prevent sniffers from see its contents.

The class buffers the page contents to be able to send the headers of new session cookie values before the page contents are served.

Innovation Award  
PHP Programming Innovation award nominee
December 2006
Number 2

Prize: One book of choice by O'Reilly
By default, sessions use server side files to store and retrieve session data on each request.

Storing session data in files works well for single server sites. For sites served by a cluster, it may become too slow, if possible at all.

This class implements an alternative session handling solution that uses cookies to store session data. It uses encryption to preserve the integrity and privacy of the data that is stored.

Despite this solution leads to a greater bandwidth usage, it is a much less complicated solution than other alternatives to make sessions work in a clustered Web server environment.

Manuel Lemos
Picture of Ahmed Magdy Ezzeldin
Name: Ahmed Magdy Ezzeldin <contact>
Classes: 4 packages by
Country: Egypt Egypt
Age: 34
All time rank: 5894 in Egypt Egypt
Week rank: 1041 Down16 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file cookie_session.php Class The cookie session class
Plain text file doc.txt Doc. Read me file
Plain text file test2.php Example The second example script that shows the samed session data.
Plain text file test1.php Example the first test file where session is set.

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,645All time:1,335
 This week:0This week:1,070Up
User Ratings User Comments (1)  
 All time
Good job.
1 year ago (sergey)