Cost-effective Disaster Recovery Options for Mission-critical Applications
This Custom Technology Adoption Profile Report was a commissioned study conducted by Forrester Consulting. You will learn how: replication becomes more cost-effective, enhanced Disaster Recovery capabilities shorten recovery objectives, and where the future of DR lies with advanced continuity tools.
Cost-effective Disaster Recovery Options for Mission-critical ApplicationsA white paper by: Forrester
";
//print_r($request_url); // http://intratest.provo.novell.com/form_builder/index.php/forms/display_form/rac
// https://intratest.attachmategroup.com/form_builder/index.php/forms/display_form/rac
$json_response = '';
if (empty($_GET['hide_demandbase'])) {
$current_ip = $_SERVER['REMOTE_ADDR'];
$headers = apache_request_headers();
if(isset($headers["X-Forwarded-For"])) {
$x_forwarded_for_arr = explode(',', $headers["X-Forwarded-For"]);
$current_ip = trim($x_forwarded_for_arr[0]);
}
$ip_data_apc_key = "demandbase_data_$current_ip";
//apc_delete($ip_data_apc_key);
if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) {
if (apcu_exists($ip_data_apc_key)) {
$json_response = apcu_fetch($ip_data_apc_key);
} else {
require_once($_SERVER['DOCUMENT_ROOT'].'/common/util/classes/demandbase_helper.php');
$demandbase_helper = new demandbase_helper();
$json_response = $demandbase_helper->get_ip_based_data($current_ip);
apcu_store($ip_data_apc_key, $json_response, 604800); // store 1 week
}
}
else {
if (apc_exists($ip_data_apc_key)) {
$json_response = apc_fetch($ip_data_apc_key);
} else {
require_once($_SERVER['DOCUMENT_ROOT'].'/common/util/classes/demandbase_helper.php');
$demandbase_helper = new demandbase_helper();
$json_response = $demandbase_helper->get_ip_based_data($current_ip);
apc_store($ip_data_apc_key, $json_response, 604800); // store 1 week
}
}
}
$cookies = "";
foreach($_COOKIE as $cookie => $val){
$cookies .= $cookie."=".$val."; ";
}
// print_r($request_url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIE, $cookies);
$data = array();
if (!empty($_POST)) {
$data = $_POST;
}
if (!empty($json_response)) {
$data['demandbase_data'] = json_decode($json_response, true);
}
$post_data = array(
'data' => $data,
);
curl_setopt($ch, CURLOPT_POST, count($data));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$result = curl_exec($ch);
if ($result === false) {
// echo "curl error"; // DREW TODO - remove this echo
// echo curl_error($ch);
} else {
// echo "no error";
}
curl_close($ch);
// header ("content-type: text/html");
echo $result;
}