Skip to content

Commit 0a683fc

Browse files
committed
Add setCookieFile() and setCookieJar() methods
1 parent 2740cb8 commit 0a683fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Curl.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ public function setCookie($key, $value) {
138138
$this->setOpt(CURLOPT_COOKIE, http_build_query($this->_cookies, '', '; '));
139139
}
140140

141+
public function setCookieFile($cookie_file) {
142+
$this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
143+
}
144+
145+
public function setCookieJar($cookie_jar) {
146+
$this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
147+
}
148+
141149
public function setOpt($option, $value, $_ch=null) {
142150
$ch = is_null($_ch) ? $this->curl : $_ch;
143151

0 commit comments

Comments
 (0)