You are here

function hook_google_appliance_curl_alter in Google Search Appliance 7

Alter cURL request sent to Google Search Appliance.

This hook is invoked after Google Search Appliance builds the query, just before the query is sent to the appliance.

Use this to alter options of the cURL request.

Parameters

$options: The cURL options, represented as multi-dimensional, associative array just before it is sent to the search appliance.

See also

google_appliance_search_view()

http://www.php.net/manual/en/function.curl-setopt.php

Related topics

1 invocation of hook_google_appliance_curl_alter()
google_appliance_search_view in ./google_appliance.module
Top level search execution (menu callback)

File

./google_appliance.api.php, line 68
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_google_appliance_curl_alter(&$options) {

  // Enable verbose logging to STDERR.
  $options[CURLOPT_VERBOSE] = TRUE;

  // Set HTTP proxy to tunnel requests through.
  $options[CURLOPT_PROXY] = 'http://gsa-proxy.example.com';
}