FileCookieJar implementation for Google Chrome EditThisCookie extension in Guzzle.
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),
]);
Licensed under the MIT license
Read LICENSE for more information