PHP Classes

Notable PHP package: PHP SameSite Cookie Setter

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Viewers: 161

Last month viewers: 1

Categories: Notable Packages

SameSite cookies are a means to avoid leaking information about the current user accessing a site in a way that only the site that sets the cookie has access to the cookie values.

PHP 7.3 introduced built-in support to SameSite cookies. This class allows setting same site cookies in a way that works in a compatible way in previous PHP versions.

Read this article to learn more details about how this notable PHP package works.




Loaded Article
The package PHP SameSite Cookie Setter is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Set cookie values with the SameSite flag enabled

Here follows in more detail what it does:

This class can set cookie values with the SameSite flag enabled.

It can take as parameters the name and value for the cookie to be set, as well an array of options that define several optional values. The options can be for setting flags like SameSite, Secure, HttpOnly and Expires.

The class modifies the header created by the PHP setcookie() function sending a HTTP header values compatible to the one that that PHP function sends.

The class also checks if the user browser so it only sends the SameSite and other cookie flags to browsers that support it.

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

1,611,040 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)