You are here

function httprl_boot in HTTP Parallel Request & Threading Library 7

Same name and namespace in other branches
  1. 6 httprl.module \httprl_boot()

Implements hook_boot().

File

./httprl.module, line 3289
HTTP Parallel Request Library module.

Code

function httprl_boot() {
  global $base_root;
  $full_url = $base_root . request_uri();

  // Return if this is not a httprl_async_function_callback request.
  if (strpos($full_url, '/httprl_async_function_callback') === FALSE || $_SERVER['REQUEST_METHOD'] !== 'POST' || empty($_POST['master_key']) || empty($_POST['temp_key']) || strpos($_POST['temp_key'], 'httprl_') !== 0 || !empty($_POST['function'])) {
    return NULL;
  }

  // Load httprl.async.inc.
  if (defined('DRUPAL_ROOT')) {
    require_once DRUPAL_ROOT . '/' . dirname(drupal_get_filename('module', 'httprl')) . '/httprl.async.inc';
  }
  else {
    require_once './' . dirname(drupal_get_filename('module', 'httprl')) . '/httprl.async.inc';
  }
  httprl_async_page();
}