Instance Class
require_once "sitemap-generator.php";
$sitemap = new Sitemap;
If you skip any url
$sitemap->skip(["https://www.lipsum.com/skip"]);
if you set priority. default priority is 1.0
$sitemap->priority("1.0");
if you set frequency. default frequency is daily
$sitemap->frequency("weekly");
set crewl url
$sitemap->url("https://www.lipsum.com/");
if you output only url in array
$scan = $sitemap->scan();
echo '<pre>';
print_r ($scan);
if you output xml formated data in array
$render = $sitemap->render();
echo '<pre>';
print_r ($render);
if you output xml file
header('Content-Type: text/xml; charset=utf-8');
echo $sitemap->makeXML();
if you force download
$sitemap->download(); // filename is sitemap.xml
or
$sitemap->download('filename.xml');
if you save file your directory
$sitemap->save(); // filename is sitemap.xml
or
$sitemap->save('filename.xml');