File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ Curl::getCookie($key)
211211Curl::getInfo($opt = null)
212212Curl::getOpt($option)
213213Curl::getResponseCookie($key)
214+ Curl::getResponseCookies()
214215Curl::head($url, $data = array())
215216Curl::options($url, $data = array())
216217Curl::patch($url, $data = array())
Original file line number Diff line number Diff line change 1+ <?php
2+ require __DIR__ . '/../vendor/autoload.php ' ;
3+
4+ use \Curl \Curl ;
5+
6+ $ curl = new Curl ();
7+ $ curl ->get ('https://secure.php.net/ ' );
8+
9+ if ($ curl ->error ) {
10+ echo 'Error: ' . $ curl ->errorCode . ': ' . $ curl ->errorMessage . "\n" ;
11+ } else {
12+ echo 'Response cookies: ' . "\n" ;
13+ var_dump ($ curl ->responseCookies );
14+ var_dump ($ curl ->getResponseCookies ());
15+ }
Original file line number Diff line number Diff line change @@ -745,6 +745,18 @@ public function getResponseCookie($key)
745745 return isset ($ this ->responseCookies [$ key ]) ? $ this ->responseCookies [$ key ] : null ;
746746 }
747747
748+ /**
749+ * Get Response Cookies
750+ *
751+ * @access public
752+ *
753+ * @return array
754+ */
755+ public function getResponseCookies ()
756+ {
757+ return $ this ->responseCookies ;
758+ }
759+
748760 /**
749761 * Set Max Filesize
750762 *
You can’t perform that action at this time.
0 commit comments