Download the PHP package mferly/session-parser without Composer

On this page you can find all versions of the php package mferly/session-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package session-parser

SessionParser

Use this to iterate through active session files within the defined PHP sessions folder found in php.ini

Hint: your sessions directory is probably located at /var/lib/php/sessions/

Getting Started

WARNING: Don't keep these files in a public folder of any kind.

Due to permission issues you'll likely run into if you attempt to execute this from the browser, use CLI only.

You'll want to have a look at private static $needle = 'auth|b:1'; in SessionParser.php and make the necessary change to reflect your $_SESSION key. The Docblock has more info.

Basic Usage

You can pass your session directory to (new \SessionParser\SessionParser)::init() as an argument or just use the default as stated in private static $sessionFolderPath = '/var/lib/php/sessions/';

You'll likely have to sudo the following command for it to work. Or just run as root. Whatever works for your ENV.

$ sudo php -f index.php

Should return number of active sessions ¯\_(ツ)_/¯

This is where a check is being made to determine length of time between current time - session file modified time, and if it's within bounds set by static::$sessionGcMaxlifetime then static::$counter is iterated.

Prerequisites

After Thoughts

While this program will simply echo the result, there is no reason this cannot be modified to write the result to a file, database, emailed to a recipient, etc.

Contributing

Licence

MIT

Creator

mferly


All versions of session-parser with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mferly/session-parser contains the following files

Loading the files please wait ....