diff --git a/httpclient.php b/httpclient.php index e0c39a6..4f2d350 100644 --- a/httpclient.php +++ b/httpclient.php @@ -442,6 +442,20 @@ class Httpclient } // }}} + /** Get/Set the ssl options + * @param array|null $ssloptions The SSL Options to use + * @return $this + */ + public function ssloptions ($ssloptions = null) + // {{{ + { + if ($ssloptions === null) + return $this->ssloptions; + $this->ssloptions = $ssloptions; + return $this; + } + // }}} + ////////////////////////////////// //// THE ACTIVE METHODS //// ////////////////////////////////// @@ -457,7 +471,7 @@ class Httpclient * @param array|null $ssloptions The SSL options (stream_context_set_option) * @return the page body */ - public function getPage ($url, $ssloptions = array ()) + public function getPage ($url, $ssloptions = null) // {{{ { $this->method ("GET"); @@ -472,11 +486,12 @@ class Httpclient * @param array|null $ssloptions The SSL options (stream_context_set_option) * @return $this */ - public function connect ($ssloptions = array ()) + public function connect ($ssloptions = null) // {{{ { $this->log (2, "## URL Start $this->method $this->url"); - $this->ssloptions = $ssloptions; + if ($ssloptions !== null) + $this->ssloptions = $ssloptions; $this->headersReceived = array (); $this->bodySize = null; $this->httpCode = null;