PHPackages                             flores/sitemap-maker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. flores/sitemap-maker

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

flores/sitemap-maker
====================

SitemapMaker is a PHP library for generating XML sitemaps. It provides an easy way to create, manage, and export sitemaps following the standard protocol.

v1.0.0(1y ago)019mitPHP

Since Mar 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nelson-flores/SitemapMaker)[ Packagist](https://packagist.org/packages/flores/sitemap-maker)[ RSS](/packages/flores-sitemap-maker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

SitemapMaker
============

[](#sitemapmaker)

SitemapMaker is a PHP library for generating XML sitemaps. It provides an easy way to create, manage, and export sitemaps following the standard protocol.

Features
--------

[](#features)

- Create XML sitemaps dynamically
- Set change frequency, priority, and last modification date
- Save the sitemap to a file
- Stream the sitemap as an XML response
- Support for setting a specific timezone for `lastmod`

Installation
------------

[](#installation)

### Install via Composer

[](#install-via-composer)

```
composer require flores/sitemap-maker

```

### Manual Installation

[](#manual-installation)

Simply include the `Sitemap.php` and `URL.php` classes in your project.

Usage
-----

[](#usage)

```
use Flores\SitemapMaker\Sitemap;
use Flores\SitemapMaker\URL;

// Create a new sitemap with a specific timezone
$sitemap = new Sitemap("America/New_York");

// Add URLs
$url1 = new URL("https://example.com");
$url1->setChangefreq(URL::$CHANGEFREQ_DAILY);
$url1->setPriority(URL::$PRIORITY_MAX);
$url1->setLastMod(date('Y-m-d'));
$sitemap->add($url1);

$url2 = new URL("https://example.com/about");
$sitemap->add($url2);

// Save the sitemap to a file
$sitemap->save("sitemap.xml");

// Get the sitemap as a string
$xmlString = $sitemap->get();

// Stream the sitemap as an XML response
$sitemap->stream();
```

Timezone Support
----------------

[](#timezone-support)

The `Sitemap` class allows you to specify a timezone when creating the object. By default, it uses `Africa/Maputo`. This ensures that `lastmod` timestamps are correctly formatted according to the specified timezone.

Example:

```
$sitemap = new Sitemap("Europe/London");
```

This will ensure that all `lastmod` values are converted to `Europe/London` timezone before being added to the XML.

License
-------

[](#license)

This project is open-source and available under the MIT License.

Author
------

[](#author)

Nelson Flores ()

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

420d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a92c90aeaf8cf54c36e5c7fdf5c329a5f7be5a9fbd8d995fb8a50f2be939c4f4?d=identicon)[nelsonflores\_mz](/maintainers/nelsonflores_mz)

---

Top Contributors

[![nelson-flores](https://avatars.githubusercontent.com/u/34948807?v=4)](https://github.com/nelson-flores "nelson-flores (6 commits)")

### Embed Badge

![Health badge](/badges/flores-sitemap-maker/health.svg)

```
[![Health](https://phpackages.com/badges/flores-sitemap-maker/health.svg)](https://phpackages.com/packages/flores-sitemap-maker)
```

###  Alternatives

[yii2mod/yii2-markdown

Markdown Widget for Yii2

1347.7k5](/packages/yii2mod-yii2-markdown)[splitbrain/php-ringicon

A indenticon/glyphicon like avatar generator

1613.3k1](/packages/splitbrain-php-ringicon)[willywes/agora-sdk-php

Agora.io SDK PHP

1023.2k2](/packages/willywes-agora-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
