You are here

private function PurgeHandlerCurl::execute_single in Purge 7.2

Function to procerss a single purge with curl.

1 call to PurgeHandlerCurl::execute_single()
PurgeHandlerCurl::execute in includes/purge.class.inc
Funtion will determine what options are set and call the right execute function.

File

includes/purge.class.inc, line 549
Contains all class and interface definitions for Purge.

Class

PurgeHandlerCurl
Class definition for the Curl HTTP request library.

Code

private function execute_single($purges, $handler_options) {
  foreach ($purges as $purge_id => $purge) {
    $curl_request = $this
      ->get_curl_request($purge, $handler_options);

    // Execute the request
    curl_exec($curl_request);

    // Get http status code.
    $info = curl_getinfo($curl_request);
    $purges[$purge_id]['http_code'] = $info['http_code'];
  }
  return $purges;
}