|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not yet rated by the users||Total: 127 ||All time: 9,313 This week: 310|
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.
|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.
This PHP class enables samesite supported cookies by modifying header created by setcookie() function.
As of php version 7.3.0, new signature of setcookie() function exists.
To support all php versions, this class use same parameters of new setcookie() signature.
The browser agent is also checked against incompatible list of browsers.
composer require ovunctukenmez/samesite-cookie-setter
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.