From ebb6d9ab5f71278dc5622f6fcc10e9e0d53af41f Mon Sep 17 00:00:00 2001 From: franzz Date: Sat, 3 Sep 2016 12:51:12 +0200 Subject: [PATCH] adding cookie jar --- standalone/rarbg/rarbg.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/standalone/rarbg/rarbg.php b/standalone/rarbg/rarbg.php index e52f924..97fbc04 100644 --- a/standalone/rarbg/rarbg.php +++ b/standalone/rarbg/rarbg.php @@ -32,8 +32,10 @@ function getCurl($sUrl, $bHeader=false, $asPostData=array()) //Cookies //$sCookies = $this->getCookies(); //if($sCookies!='') curl_setopt($oCurl, CURLOPT_COOKIE, $sCookies); - //curl_setopt($oCurl, CURLOPT_COOKIEJAR, $this->fCookieJar); - //curl_setopt($oCurl, CURLOPT_COOKIEFILE, $this->fCookieJar); + $fCookieJar = tempnam('/tmp','cookie'); + curl_setopt($oCurl, CURLOPT_COOKIESESSION, true); + curl_setopt($oCurl, CURLOPT_COOKIEJAR, $fCookieJar); + curl_setopt($oCurl, CURLOPT_COOKIEFILE, $fCookieJar); $sContent = curl_exec($oCurl);