adding cookie jar

This commit is contained in:
2016-09-03 12:51:12 +02:00
parent d596fc448a
commit ebb6d9ab5f

View File

@@ -32,8 +32,10 @@ function getCurl($sUrl, $bHeader=false, $asPostData=array())
//Cookies //Cookies
//$sCookies = $this->getCookies(); //$sCookies = $this->getCookies();
//if($sCookies!='') curl_setopt($oCurl, CURLOPT_COOKIE, $sCookies); //if($sCookies!='') curl_setopt($oCurl, CURLOPT_COOKIE, $sCookies);
//curl_setopt($oCurl, CURLOPT_COOKIEJAR, $this->fCookieJar); $fCookieJar = tempnam('/tmp','cookie');
//curl_setopt($oCurl, CURLOPT_COOKIEFILE, $this->fCookieJar); curl_setopt($oCurl, CURLOPT_COOKIESESSION, true);
curl_setopt($oCurl, CURLOPT_COOKIEJAR, $fCookieJar);
curl_setopt($oCurl, CURLOPT_COOKIEFILE, $fCookieJar);
$sContent = curl_exec($oCurl); $sContent = curl_exec($oCurl);