<?php
$mJsonArray = array();
$mJsonArray['piHeaderId'] = 91;
$mJsonArray['currentUser'] = 'admin';
$mJsonObject = json_encode($mJsonArray, JSON_FORCE_OBJECT);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://192.168.201.40:8091/pi/countVarienceValuePI?piHeaderId=91&userId=admin");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); 
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $mJsonObject);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$mResult = curl_exec($ch);
$mErrors = curl_error($ch);
$mResponse = curl_getinfo($ch, CURLINFO_HTTP_CODE);

curl_close($ch);
if ($mResponse != "200")
	print_r("FAIL-Unexpected System Error -".$mResult.":".$mResponse.":".$mErrors.":".$mJsonObject);
else
{
	$mErrMsg = "OK  - Post Complete";
}
?>