PHP Classes

File: vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php

Recommend this page to a friend!
  Classes of Hillary Kollan   Chatto PHP Websocket Chat System   vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php   Download  
File: vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_samesite.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chatto PHP Websocket Chat System
Websocket based chat system using Ratchet library
Author: By
Last change:
Date: 3 years ago
Size: 383 bytes
 

Contents

Class file image Download
<?php

require __DIR__.'/common.inc';

use
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;

$storage = new NativeSessionStorage(['cookie_samesite' => 'lax']);
$storage->setSaveHandler(new TestSessionHandler());
$storage->start();

$_SESSION = ['foo' => 'bar'];

ob_start(function ($buffer) { return str_replace(session_id(), 'random_session_id', $buffer); });