Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (6) | Download .zip | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 20 This week: 1 | All time: 11,180 This week: 560 |
Version | License | PHP version | Categories | |||
netscape-cookie 1.0.0 | MIT/X Consortium ... | 5 | HTTP, PHP 5 |
Description | Author | |
This package can store and retrieve cookie values in Netscape files. |
composer require mateodioev/netscape-cookie
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
Files |
File | Role | Description | ||
---|---|---|---|---|
src (3 files) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
readme.MD | Doc. | Documentation |
Files | / | src |
File | Role | Description |
---|---|---|
Config.php | Class | Class source |
Cookie.php | Class | Class source |
FileHandler.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.