Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
8.1.8
Disk Space
203.89 GB
Server Addr
171.9.3.2
Your IP
171.9.3.1
Edit File
File:
<?php class Session { /** * Session constructor. */ public function __construct() { if (!session_id()) { session_start(); } } /** * @param $name * @return null|mixed */ public function __get($name) { if (!empty($_SESSION[$name])) { return $_SESSION[$name]; } return null; } /** * @param $name * @return bool */ public function __isset($name) { return $this->has($name); } /** * @return null|object */ public function all(): ?object { return (object)$_SESSION; } /** * @param string $key * @param mixed $value * @return Session */ public function set(string $key, $value): Session { $_SESSION[$key] = (is_array($value) ? (object)$value : $value); return $this; } /** * @param string $key * @return Session */ public function unset(string $key): Session { unset($_SESSION[$key]); return $this; } /** * @param string $key * @return bool */ public function has(string $key): bool { return isset($_SESSION[$key]); } /** * @return Session */ public function regenerate(): Session { session_regenerate_id(true); return $this; } /** * @return Session */ public function destroy(): Session { session_destroy(); return $this; } /** * CSRF Token */ public function csrf(): void { $_SESSION['csrf_token'] = md5(uniqid(rand(), true)); } }