You are here

function _chr_curl_set_cookie_settings in cURL HTTP Request 6

Same name and namespace in other branches
  1. 7 chr.module \_chr_curl_set_cookie_settings()

Set default cookie settings

Parameters

array $options [reference]: Options array

object $ch [reference]: cURL Object

1 call to _chr_curl_set_cookie_settings()
chr_curl_http_request in ./chr.module
Performs an HTTP request.

File

./chr.module, line 502

Code

function _chr_curl_set_cookie_settings(&$options, &$ch) {

  // Set cookie settings
  if ($options['cookiefile']) {
    curl_setopt($ch, CURLOPT_COOKIEJAR, $options['cookiefile']);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $options['cookiefile']);
  }
}