adding cookie jar
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user