<?php
include_once "GoogleSiteMap.php";
// Create the GoogleSiteMap XML String
$map=new GoogleSiteMap();
//Add simple URL
$map->AddURL("http://www.test.php?cat=boutique&id=5");
//Add an url with full option, but leave empty the not obligatory option.
$map->AddURL(array(loc=>"http://www.test.php?cat=boutique&id=6",lastmod=>"",changefreq=>"",priority=>""));
//Add another url with full option
$map->AddURL(array(loc=>"http://www.test.php?cat=boutique&id=7",lastmod=>"",changefreq=>"always",priority=>"0.2"));
//Add another url with full option
$map->AddURL(array(loc=>"http://www.test.php?cat=boutique&id=8",lastmod=>"1989-10-12",changefreq=>"never",priority=>"0.9"));
//But you can add multiple urls too
// We make an array of urls in string or array format ...
$a=array();
array_push($a,"http://www.test.php?cat=boutique&id=5");
array_push($a,array(loc=>"http://www.test.php?cat=boutique&id=6",lastmod=>"",changefreq=>"",priority=>""));
array_push($a,array(loc=>"http://www.test.php?cat=boutique&id=8",lastmod=>"1989-10-12",changefreq=>"never",priority=>"0.9"));
//...then we add them in the XML STRING
$map->AddURLs($a);
//Record the XML String
$result=$map->CloseMap();
//Output the XML String
$map->ViewMap();
//write the XML file to a specified file
//$map->WriteFlux("sitemap.xml");
?>