PHPackages                             felconca/session-cookies-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. felconca/session-cookies-manager

ActiveLibrary

felconca/session-cookies-manager
================================

A lightweight PHP library for managing sessions.

v1(5mo ago)07MITPHPPHP &gt;=7.4

Since Nov 12Pushed 5mo agoCompare

[ Source](https://github.com/felconca/session-cookies-manager)[ Packagist](https://packagist.org/packages/felconca/session-cookies-manager)[ RSS](/packages/felconca-session-cookies-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Session Cookies Manager
=======================

[](#session-cookies-manager)

A lightweight and secure PHP library for managing sessions with ease.
It provides a simple, object-oriented interface to **create**, **read**, **update**, **regenerate**, and **destroy** sessions — all while supporting **secure cookie settings**, **namespaces**, and **automatic session timeout** for idle users.

🚀 Features
----------

[](#-features)

- 🔒 Secure session cookie configuration (`HttpOnly`, `Secure`, `SameSite`)
- 🧩 Namespaced session storage (isolated data per module)
- ⏱️ Automatic idle timeout expiration
- 🔁 Session ID regeneration for security
- 💣 Safe session destruction
- 🧠 Compatible with **PHP 7.4+ and PHP 8+**

📦 Installation
--------------

[](#-installation)

### Option 1: Manual Installation

[](#option-1-manual-installation)

1. Download or clone this repository:

    ```
    git clone https://github.com/felconca/session-cookies-manager.git
    cd session-manager
    ```
2. Include the class in your project:

    ```
    require_once __DIR__ . '/src/SessionManager.php';
    ```

### Option 2: Composer (Recommended)

[](#option-2-composer-recommended)

If you use Composer, add this package to your `composer.json`:

```
composer require felconca/session-cookies-manager
```

Then include Composer’s autoloader:

```
require_once __DIR__ . '/vendor/autoload.php';
```

⚙️ Usage Example
----------------

[](#️-usage-example)

```
