getCTime() >= 2678400) //31 days { unlink(__DIR__ . '/../data/sessions/' . $file->getFilename()); } } $newSessionKey = uniqid() . uniqid() . uniqid(); file_put_contents(__DIR__ . "/../data/sessions/$newSessionKey.txt", ''); return $newSessionKey; } public static function RemoveSession($sessionKey) { unlink(__DIR__ . "/../data/sessions/$sessionKey.txt"); } }