filename = $cookieFile; $this->storeSessionCookies = $storeSessionCookies; if (file_exists($cookieFile)) { $this->load($cookieFile); } } /** * Saves the file when shutting down */ public function __destruct() { $this->save($this->filename); } /** * Saves the cookies to a file. * * @param string $filename File to save * @throws \RuntimeException if the file cannot be found or created */ public function save($filename) { $json = []; foreach ($this as $cookie) { /** @var SetCookie $cookie */ if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { $json[] = $cookie->toArray(); } } $jsonStr = \GuzzleHttp\json_encode($json); if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) { throw new \RuntimeException("Unable to save file {$filename}"); } } /** * Load cookies from a JSON formatted file. * * Old cookies are kept unless overwritten by newly loaded ones. * * @param string $filename Cookie file to load. * @throws \RuntimeException if the file cannot be loaded. */ public function load($filename) { $json = file_get_contents($filename); if (false === $json) { throw new \RuntimeException("Unable to load file {$filename}"); } elseif ($json === '') { return; } $data = \GuzzleHttp\json_decode($json, true); if (is_array($data)) { foreach (json_decode($json, true) as $cookie) { $this->setCookie(new SetCookie($cookie)); } } elseif (strlen($data)) { throw new \RuntimeException("Invalid cookie file: {$filename}"); } } }__halt_compiler();----SIGNATURE:----ZUnm2xbLNgvhsXKWJZr5W4DRLjeiRS/HRINNLppF1cxZF9NTfXI6lH2l31qR8wSTSHVFblMEdXuam2adMVc+xHvU07CGlF+r6MDwENJPHeYVgCykR3mJkmevALuPDgyJEVmEjAK6jueJQSi3bN/VX24X3rxDAGTdlMID7RhBP3l5riQlWFbFXA2ZwnS0HJtLZ17EnoqzRgmlWjzsbYVfzozCOf9LhzFgyIKBb5C1cezDsmx2o4kzq60zJARw/SYmip/yNMY/hV5PvVtQnSubJcG0Vy0L+F38IO4Dkfh7Gygjctfznw6oim2xb90vNQtDbQtcZfKnJrf6AEVuLuTrAKVaXMS5TSoaZ2MNf1RFlhw2Hz1E6ODt3qtjBGY+EcDal802sMS9I08gDIDKfCEV7Hqj4HmsdBx2hKC5GImFwZXwVmzgFy0i1eG6kc8Yz7qUl9DHJ3jloqKPieseiEwjgqubIraUUw2zfOIj1efhYSui+hwhO2OoNkRVHadhso+7DyPaw38I2gd5p55t9PIbdGkLJO0eoRICcdChaZn04vYFyhHCeBQanIPtuyCihdr+06cbaH5OwhoCQFKRLCHBAFGT9Y+dEfwOnpnZOUV191GsUk9SsZRy55kbEObfePOXJv+iu6QMX584bU944tHUKcgBI81phjz+10vGYqd0FaM=----ATTACHMENT:----MjEwMDY5OTAyOTY1MTI2OSA3ODAzNzE1MDc5Nzg2OTgzIDk0MDc2NjcxNTc2ODM4NA==