{"id":15024348,"url":"https://github.com/solutionstack/xsession","last_synced_at":"2026-02-28T14:30:59.974Z","repository":{"id":214795042,"uuid":"105446557","full_name":"solutionstack/XSession","owner":"solutionstack","description":"A OOPHP class to easily and securely handle sessions ","archived":false,"fork":false,"pushed_at":"2018-06-13T04:12:30.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-20T12:05:09.907Z","etag":null,"topics":["object-oriented-programming","php56","php7","session-management"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solutionstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-10-01T14:05:36.000Z","updated_at":"2022-11-08T22:05:30.000Z","dependencies_parsed_at":"2023-12-30T20:37:46.948Z","dependency_job_id":"9b6d362b-ec4d-4ccb-a2af-a02857fdf587","html_url":"https://github.com/solutionstack/XSession","commit_stats":null,"previous_names":["solutionstack/xsession"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FXSession","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FXSession/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FXSession/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionstack%2FXSession/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutionstack","download_url":"https://codeload.github.com/solutionstack/XSession/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243440629,"owners_count":20291321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["object-oriented-programming","php56","php7","session-management"],"created_at":"2024-09-24T20:00:09.579Z","updated_at":"2025-10-29T13:32:20.539Z","avatar_url":"https://github.com/solutionstack.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/solutionstack/XSession.svg?branch=master)](https://travis-ci.org/solutionstack/XSession)\n[![GitHub release](https://img.shields.io/github/release/solutionstack/XSession.svg)]()\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/solutionstack/XSession/issues)\n\n\n# XSession\nAn OO-PHP class to easily handle sessions \n\n## Requirements\n - PHP 7+\n\n## Usage\n Include or autoload the XSession.php file, then use as follows..\n \n ```php\n     use solutionstack\\XSession;\n\n    //create A session\n    $s = new XSession(string session_name, int session_lifetime_in_secs);\n    \n    //add session data as needed\n    $s-\u003eput(\"foo\", \"bar\"):\n    $s-\u003eput(\"user_email\", \"mail@example.com\");\n    \n ```\n ## In other pages you need to use (check/resume) the session, just do..\n \n ```php\n    use solutionstack\\XSession;\n    \n   //use the same session name used in starting the session\n   $s = new XSession(string session_name);\n   \n   if($s-\u003eresume()) { //check if session was succesfully resumed\n  \n      //do stuff for authenticated users\n      //also get previously set session values, or set new one\n      $email = $s-\u003eget(\"user_email\");\n   }\n   else{\n            //session didn't resume succesfully, logout or do other stuff \n   }\n ```\n ## When done with the session, say in your logout routine,..\n \n  ```php\n  \n    use solutionstack\\XSession;\n    \n    //use the same session name used in starting the session\n   $s = new XSession(string session_name);\n   $s-\u003eend();\n   \n \n ```\n ### And Thats it.\n \n ### XSession uses ideas from the following project [SecureSessionHandler] \n See  https://gist.github.com/eddmann/10262795    \n \n License\n ----\n\n Apache 2\n\n\n **Free Software, Hell Yeah!**\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionstack%2Fxsession","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutionstack%2Fxsession","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionstack%2Fxsession/lists"}