zoilomora / editthiscookie-for-guzzle
FileCookieJar implementation for EditThisCookie in Guzzle
Installs: 1 069
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- guzzlehttp/guzzle: ^7.2
Requires (Dev)
- pccomponentes/coding-standard: ^1.2
- phpstan/phpstan: ^0.12.59
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-12-11 00:58:42 UTC
README
FileCookieJar implementation for Google Chrome EditThisCookie extension in Guzzle.
Usage
This implementation allows the use of cookies exported from the Google Chrome EditThisCookie extension directly in Guzzle and in turn.. the cookies that Guzzle has modified re-import them into the browser.
Example:
Once the website is logged in, export the cookies json
in a cookies.json
file.
<?php declare(strict_types=1); $cookieFile = './var/cookies.json'; $client = new \GuzzleHttp\Client([ 'cookies' => new \ZoiloMora\EditThisCookie\Guzzle\FileCookieJar($cookieFile), ]);
License
Licensed under the MIT license
Read LICENSE for more information