$cookieValue = $_COOKIE['DesigntoolAuth'];
// Initiate curl
$ch = curl_init();
// Disable SSL verification
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$cookie_file = tempnam (sys_get_temp_dir(), 'cookie');
echo $cookie_file;
// and set the cURL cookie jar and file
if (!file_exists($cookie_file) || !is_writable($cookie_file)){
echo 'Cookie file missing or not writable.';
die;
}
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieValue);
/* make sure you provide FULL PATH to cookie files*/
// Will return the response, if false it print the response
// Set the url
curl_setopt($ch, CURLOPT_URL,$url);
// Execute
$api_result=curl_exec($ch);
// Closing
curl_close($ch);
$data = json_decode($api_result, true);
//var_dump($data);
$api_result = json_encode($data);
//$count= count($api_result);
echo $api_result;
I have written above code to get the details as per cookie send in request, but not getting the result