Cookie

Cookies serve as a fundamental web technology that enables websites to store small pieces of data directly within a user’s web browser. This stored information persists across browsing sessions, allowing websites to remember specific details about visitors when they return. The primary purposes include tracking user behavior, maintaining login states, personalizing content, and identifying returning visitors to provide customized experiences based on their previous interactions with the site.

<?php

setcookie('aCookieName', 'Cookie value', time()+3600);  /* expire in 1 hour */

?>

Documentation

See also Cookies in PHP and PHP Cookies.

Related : Hyper Text Transfer Protocol (HTTP), Headers, Single Sign On (SSO)

Related packages : dflydev/fig-cookies