>'; // Bestand uitlezen function getFile($fn) { $f = @fopen($fn, "r"); if ($f) { $src = ""; while (!feof($f)) $src .= fread($f, 1024); fclose($f); } else { $src = FALSE; } return $src; } // XML-ontleden $dom = new DomDocument; $dom->preserveWhiteSpace = FALSE; $dom->loadXML(getFile($trackUrl)); $params = $dom->getElementsByTagName('Latitude'); foreach ($params as $param) { $latitude = $param -> nodeValue; } $params = $dom->getElementsByTagName('Longitude'); foreach ($params as $param) { $longitude = $param -> nodeValue; } $params = $dom->getElementsByTagName('Timestamp'); foreach ($params as $param) { $timestamp = strtotime($param -> nodeValue); } // corrigeer timestamp voor Nederlands tijd (+8 uur) $timestamp = $timestamp + (8*60*60); $timestamp = date ("l \\t\h\e jS \of F Y @ H:i", $timestamp); ?>