You are here

function flickr_curl_set_options in Flickr 7

Set cURL options.

Parameters

array $options [reference]: Options array

object $ch [reference]: cURL Object

1 call to flickr_curl_set_options()
flickr_curl_http_request in ./flickr.inc
Performs an HTTP request over cURL. Taken from http://cgit.drupalcode.org/chr/tree/chr.module.

File

./flickr.inc, line 2017
The Flickr API functions.

Code

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

  // Set any extra cURL options.
  foreach ($options['curl_opts'] as $opt => $value) {
    $set = curl_setopt($ch, $opt, $value);
    if (FALSE === $set) {
      watchdog('curl_http_request', 'Unable to set cURL option @opt : @value', array(
        '@opt' => $opt,
        '@value' => $value,
      ), WATCHDOG_ERROR);
    }
  }
}