79722483

Date: 2025-08-01 12:08:43
Score: 1
Natty:
Report link
<?php
ini_set("session.cookie_httponly", true);
$lifetime = 604800; // in seconds
session_set_cookie_params([
    'lifetime' => $lifetime,
    'path' => '/',
    'secure' => isset($_SERVER['HTTPS']),
    'httponly' => true, // client-side script prevented
    'samesite' => 'Lax'
]);
session_start();
?>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: 2342