Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Latest commit

 

History

History
40 lines (28 loc) · 911 Bytes

cookes.md

File metadata and controls

40 lines (28 loc) · 911 Bytes

Cookies

Get cookies list

Current bot cookies are available through getHttpClient and cookie/cookies methods. All cookies:

$cookies = $bot->getHttpClient()->cookies();

Get cookie by name

Cookie value by name:

$someCookieValue = $bot->getHttpClient()->cookie('cookieName');

Change cookies storage path

By default cookie files are stored in your system temp directory. You can set custom path to store cookies. Notice! This path must have write permissions:

$bot->getHttpClient()->setCookiesPath($yourCustomPathForCookies);

$currentPath = $bot->getHttpClient()->getCookiesPath();

Remove cookies

Remove your cookies:

$bot->getHttpClient()->removeCookies();