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:----J52QAYkyBxNJh0/N5LqXfgpSnqAuiW3//r/XbmQYPEjeEaAu3yNqTB7PZ+9cZ80SJoxP9KNDSe2fhHKL7LXzADB9rwARN8o1I6dtsfdd6xpPa92VQ4Fuw8q2bLzS1IV+AOReQod+wu+SHUJF+idFtlb1uPAkmsnZzLf/V/QnAueRyN+eAteKD4gjLnHpXrCpqKVoBDhcjcGTt+1dWGQrQjiYR1A/CudO61GIAPj3+7bWb4zDPrTPxDz6PWOdzCQyJZIN92BEsNhFK1V0Q3MKtCK+E+ICLIIyAkjmxUdmeq2yAEhsB9naJmtykm9cdPl5IRHF94xHZaZY3X79s/ODwAsMEaMgPpv46KCFrFzVyVvHIT2ACqHgY96tLzHZfX3SJRAxPABx+YaAY5eTAmbZuxfvZWp78P0hEt8mYCxatm9HfVmsnAIA5SFS7jz7J1l4AV7YuwHvUM8MFNxCEYgVrt0nmupS/lbZ02C37j7YDFtE9lDOB0hS59UIM2fVlTDEqGbp+m/sISqQoLuIV3ZY0U6bsl1o/ehgGuwlv/IO7C1oQhklqBxJTjxYmEQoSyfsMf4cZ0coRHnoGlLYsoJgDvvrE8Hiz8o60rl2/xieOAKtMNjQavJhbHcHgK0lA4Xmy+GezFDpxRMQt2ENkmE7Tmt8OMCDO++Tqs3wyPg3xNI=----ATTACHMENT:----MzM0MTQ2MjA5MzY3NDg0NCA0MTI0NTk1ODQxNjkyOTcgNDIyMjU2NzU5Njc1NDk5