Jag hade ju ordernr från TPH vilket jag fått i mitt mail. Sen letade jag upp vilket paket som va det första som skickades idag manuellt för att ha en starting-point. Sen loopade jag bara igenom alla kolli-id och sökte efter ordernr som jag hade i mailet. 
PHP:
<?php
/*
* $i contains the last digits in the URL
* Note: Last digit can be ignored which makes the search 10 times faster
*/
for ($i=73099;$i<79999;$i++)
{
// Search for 5 IDs at the same time to speed up the process
$payload = array();
for ($a=0;$a<5;$a++)
{
array_push($payload, sprintf('consignmentId=00373500454509%s', $i));
$i++;
}
$url = sprintf('http://www.posten.se/tracktrace/TrackConsignments_do.jsp?trackntraceAction=saveSearch&%s', implode('&', $payload));
if (fetch($url))
{
// Echo the URL when we find it and exit
echo $url ."\r\n";
exit();
}
else
{
// Let us know that something is happening
echo '.';
}
}
function fetch($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$body = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
if ($info['http_code'] != 200)
return false;
// String to search for in the body (ordernr from TPH)
if (strstr($body, 'xxxxxx'))
return true;
return false;
}
?>