Download the PHP package cyberomulus/sitemap-generator without Composer

On this page you can find all versions of the php package cyberomulus/sitemap-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sitemap-generator

SiteMapGenerator

What is SiteMapGenerator ?

SiteMapGenerator is a PHP library that makes it easy to generate a SiteMap and SiteMapIndex (including Google specific tags).

How to install SiteMapGenerator

There are 2 ways to install SiteMapGenerator.

If you use Composer, SiteMapGenerator is available by Packagist.
Just add the dependencies to your composer.json:

{
    "require": {
        "cyberomulus/sitemap-generator": "~2.0"
    }
}

Else, got to the page github of SiteMapGenerator and choose the release of your choice.
You can download the source code with the link 'Download ZIP'.
Place the directory in the ZIP in a lib folder (for example) of your project.

What I need to use SiteMapGenerator

It takes minimum PHP version 5.2.0 with XMLWriter extension enabled (it is enabled by default).

How to generate a SiteMapIndex

  1. Create one or more SiteMapEntry
  2. Create one SiteMapIndex
  3. Add all SiteMapEntry in SiteMapIndex
  4. Create a Formatter (example : XMLFormatter)
  5. Use Formatter::formatSiteMapIndex()

How to generate a SiteMap

  1. Create one or more URLEntry
  2. Create one SiteMap
  3. Add all URLEntry in SiteMap
  4. Create a Formatter (example : XMLFormatter)
  5. Use Formatter::formatSiteMap()

How to add Image for Google's extra

  1. Create one or more GoogleImageEntry
  2. Add all GoogleImageEntry in URLEntry

How to not actived Google's extra

Juste set Parameter at false in constructor of SiteMap. All GoogleImageEntry are not displayed

How to create a formatter

Create a class extends Formatter.

Example for generate a SiteMap with Google's extra

<urlset xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
  <loc>http://www.test.com/ok.php</loc>
  <lastmod>2015-05-17T15:04:38+02:00</lastmod>
  <changefreq>daily</changefreq>
  <priority>0.5</priority>
  <image:image>
   <image:loc>http://www.test.com/image/img1.jpg</image:loc>
   <image:title>a title for image</image:title>
   <image:caption>a caption for image</image:caption>
   <image:geo_location>Brussels, Belgium</image:geo_location>
   <image:license>http://www.test.com/image/license.txt</image:license>
  </image:image>
  <image:image>
   <image:loc>http://www.test.com/image/img1.jpg</image:loc>
   <image:title>a another title for image</image:title>
   <image:caption>a another caption for image</image:caption>
   <image:license>http://www.test.com/image/license.txt</image:license>
  </image:image>
 </url>
 <url>
  <loc>http://www.test.com/nice.php</loc>
  <lastmod>2015-05-17T15:04:38+02:00</lastmod>
  <changefreq>never</changefreq>
 </url>
 <url>
  <loc>http://www.test.com/nice.php?test=ok&amp;amp;restet=super</loc>
  <lastmod>2015-05-17T15:04:38+02:00</lastmod>
  <changefreq>never</changefreq>
 </url>
</urlset>

Example for generate a SiteMapIndex

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <sitemap>
  <loc>http://www.test.com/sitemap1.xml</loc>
  <lastmod>2015-05-17T15:07:40+02:00</lastmod>
 </sitemap>
 <sitemap>
  <loc>http://www.test.com/sitemap1.xml</loc>
  <lastmod>2015-05-17T15:07:40+02:00</lastmod>
 </sitemap>
 <sitemap>
  <loc>http://www.test.com/sitemap.php?code=3&amp;amp;restet=super</loc>
  <lastmod>2015-05-17T15:07:40+02:00</lastmod>
 </sitemap>
</sitemapindex>

What license is SiteMapGenerator

SiteMapGenerator is under MIT license (license free).
You will find the license text in the file LICENSE.


All versions of sitemap-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cyberomulus/sitemap-generator contains the following files

Loading the files please wait ....