This package is abandoned and no longer maintained. No replacement package was suggested.

Simple Google Sitemap Generator

1.0.1 2017-01-12 16:31 UTC

This package is auto-updated.

Last update: 2020-01-22 22:28:35 UTC


Author - Denis Mitrofanov

Version 1.0.0


This program crwawls the entire website storing links, priorities and update periods.

$sitemap = new Sitemap('');
    ->setExcluded(['', '', ''])
    ->setLevel(0, 1, 'daily')
    ->setLevel(1, 0.80, 'weekly')
    ->setLevel(2, 0.64, 'weekly')
    ->setLevel(3, 0.64, 'monthly')

    $links = $sitemap->generate();

First you set the website you want to parse, than set the routes you want to exclude. Levels are set from 0 as domain root, to the third level, everything else should be set as minimalPriority (default is 0.64). Default update period is set to 'monthly'.

When you run $sitemap->generate() it return a LinksCollection object. Than you can persist it to actual sitemap.xml file. By runnig $links->toXmlFile('sitemap.xml') of course you can specify full path, and not just the file name.

The output will contain xml with line for every detected link like following:


Resources that use this generator are: