function _eloqua_set_curl_opts in Eloqua 6
Sets curl options en mass, checking for errors
Parameters
$ch resource: Curl Resource
$options array: Curl settings to apply to the resource
Return value
array Status of all the set_opt calls
1 call to _eloqua_set_curl_opts()
- _eloqua_cron_get_curl_resource in ./
eloqua.cron.inc - Returns a configured Curl Resource for use
File
- ./
eloqua.cron.inc, line 270
Code
function _eloqua_set_curl_opts(&$ch, $options = array()) {
if (!is_array($options)) {
return FALSE;
}
$result = array();
foreach ($options as $key => $value) {
$status = curl_setopt($ch, $key, $value);
$status_msg = '';
if (!$status) {
$status_msg = curl_error($ch);
}
$result[$key] = array(
'status' => $status,
'value' => $value,
'message' => $status_msg,
);
}
return $result;
}