<html>
<head></head>
<body>
<?php
include_once("./check_tracking_lib.php");//check codes
//http://debuggable.com/posts/parsing-xml-using-simplexml:480f4dfe-6a58-4a17-a133-455acbdd56cb

if(!isset($HTTP_GET_VARS['url'])){
$url="sitemap.xml";
}
else{
	// load as string
	//$xmlstr = file_get_contents($source);
	//$sitemap1 = simplexml_load_string($xmlstr);
	echo $url;
	// load as file
	$sitemap = simplexml_load_file($url);
	foreach($sitemap as $url) {
	  //echo "Number: {$url['num']}: {$url->loc} - {$url->lastmod} - {$url->changefreq} - {$url->priority}\r\n";
		$html_report=get_URL($url->loc); //echo $url;
		$html_report[0][3]=check_tracking($html_report[0][2]);
		print_url_tracking($html_report);

	}
}
?>
</body>
</html>
