Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2022-10-27 (29 days ago) | | Not yet rated by the users | | Total: 14 This week: 9 | | All time: 10,792 This week: 76 |
|
Description | | Author |
This package can store and retrieve cookie values in Netscape files.
It provides one class that can create cookies to store cookie parameters and set and get their values.
Another class can save the cookie values in a text file in Netscape format. | |
|
|
Innovation award
Nominee: 4x |
|
Details
Netscape Cookies
Install
composer require mateodioev/netscape-cookie
Usage
use Mateodioev\NetscapeCookie\{Config, Cookie, FileHandler};
$cookieJar = new FileHandler((new Config)
->setDir(__DIR__.'/cookies', true)
);
$cookieJar->setFileName('cookie.txt')
->add(Cookie::create('google.com', true, '/', true, 0, 'test', 'test'))
->add(Cookie::create('google.com', true, '/', true, time() + 3600, 'test1', 'test2')
)->save();
Output:
# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# File generate by github.com/Mateodioev
google.com TRUE / TRUE 0 test test
google.com TRUE / TRUE 1666764937 test1 test2
|
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.