36include_once(
'Services/WebServices/Curl/classes/class.ilCurlConnectionException.php');
 
   60        if (!self::_isCurlExtensionLoaded()) {
 
   74        if (!function_exists(
'curl_init')) {
 
  109        if (strlen($this->url)) {
 
  110            $this->ch = curl_init($this->url);
 
  111        #$GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': ' . $this->url); 
  113            $this->ch = curl_init();
 
  118        if (curl_errno($this->ch)) {
 
  134    final public function setOpt($a_option, $a_value)
 
  136        if (!@curl_setopt($this->ch, $a_option, $a_value)) {
 
  152        curl_setopt($this->ch, CURLOPT_HEADERFUNCTION, array($this,
'parseHeader'));
 
  153        if ((@
$res = curl_exec($this->ch)) === 
false) {
 
  154            if (strlen($err = curl_error($this->ch))) {
 
  169        $header_size = $this->
getInfo(CURLINFO_HEADER_SIZE);
 
  171        $this->header_plain = substr($a_response, 0, $header_size);
 
  172        $this->response_body = substr($a_response, $header_size);
 
  195            $res = curl_getinfo($this->ch, $opt);
 
  197            $res = curl_getinfo($this->ch);
 
  213        foreach ($lines as $line) {
 
  214            list(
$name, $value) = explode(
':', $line, 2);
 
  215            $this->header_arr[
$name] = $value;
 
  228        if ($this->ch != 
null) {
 
  229            curl_close($this->ch);
 
An exception for terminatinating execution or to throw for unit testing.
getInfo($opt=0)
Get informations about a specific transfer.
parseResponse($a_response)
parse response body
__construct($a_url='')
Constructor.
getResponseBody()
Get responce body.
parseHeader($handle, $header)
Parse respone header.
init()
Init curl connection.
setOpt($a_option, $a_value)
Wrapper for curl_setopt.
exec()
Wrapper for curl_exec.
static _isCurlExtensionLoaded()
Check if curl extension is loaded.
getResponseHeaderArray()
Get response header as array.
__destruct()
Destructor @access public.
getResponseHeader()
Get response header as string.
foreach($_POST as $key=> $value) $res