Aşağıdaki cookie.txt' yolu random oluşan ve veriyi aldıktan sonra sileceğiniz bir çerez olsun.

<?php
$domain = 'https://kargotakip.araskargo.com.tr/';
$url = "{$domain}mainpage.aspx?code=3076596107489&token=076edb2e74f1ec510038b2bc74ecea2f";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3');
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookies.txt');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
preg_match_all('<A href="(.+?)" >', $response, $matches);
$invoiceUri = $matches[1][0];
$activityUri = $matches[1][1];
curl_setopt($ch, CURLOPT_URL, $domain . $activityUri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
curl_close($ch);
?>