Download the PHP package gpslab/sitemap without Composer

On this page you can find all versions of the php package gpslab/sitemap. 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

Latest Stable Version Build Status Coverage Status Scrutinizer Code Quality License

Sitemap.xml Generation Framework

This is a framework for streaming build Sitemaps.xml and index of Sitemap.xml.

See Sitemap.xml protocol for more details.

Features

Group build

This is an example of how the sitemap.xml can be build by your console command. In this example, all site links are divided into groups and a build service is created for each group. In this example, a sitemap is build from 6675 links, but this approach also facilitates the build of large site maps for 100000 or 500000 links.

Installation

Pretty simple with Composer, run:

Simple usage

Result sitemap.xml:

Change frequency

How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page.

You can define it:

Priority

The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites-it only lets the search bots know which pages you deem most important for the search bots.

You can define it:

Localized versions of page

If you have multiple versions of a page for different languages or regions, tell search bots about these different variations. Doing so will help search bots point users to the most appropriate version of your page by language or region.

You can simplify the creation of URLs for localized versions of the same page within the same domain.

Result sitemap.xml:

URL builders

You can create a service that will return a links to pages of your site.

It was a simple build. We add a builder more complicated.

We take one of the exists builders and configure it.

Sitemap index

You can create Sitemap index to group multiple sitemap files. If you have already created portions of the Sitemap, you can simply create the Sitemap index.

Result sitemap.xml:

Split URLs and make Sitemap index

You can simplify splitting the list of URLs to partitions and creating a Sitemap index.

You can push URLs into the WritingSplitIndexStream stream and he will write them to the partition of the Sitemap. Upon reaching the partition size limit, the stream closes this partition, adds it to the index and opens the next partition. This simplifies the building of a big sitemap and eliminates the need for follow size limits.

You'll get a Sitemap index sitemap.xml and a few partitions sitemap1.xml, sitemap2.xml, sitemapN.xml from a large number of URLs.

As a result, you will get a file structure like this:

Result sitemap.xml:

Split URLs in groups

You may not want to break all URLs to a partitions like with WritingSplitIndexStream stream. You might want to make several partition groups. For example, to create a partition group that contains only URLs to news on your website, a partition group for articles, and a group with all other URLs.

This can help identify problems in a specific URLs group. Also, you can configure your application to reassemble only individual groups if necessary, and not the entire map.

Note. The list of partitions is stored in the WritingSplitStream stream and a large number of partitions will spend memory.

As a result, you will get a file structure like this:

Streams

You can use a composition of streams.

Streaming to file and compress result without index.

Streaming to file and output buffer.

Writer

Render

If you install the XMLWriter PHP extension, you can use XMLWriterSitemapRender and XMLWriterSitemapIndexRender. Otherwise you can use PlainTextSitemapRender and PlainTextSitemapIndexRender who do not require any dependencies and are more economical.

The location of Sitemap file

The Sitemap protocol imposes restrictions on the URLs that can be specified in it, depending on the location of the Sitemap file:

URLs that are not considered valid may be dropped from further consideration by search bots. We do not check these restrictions to improve performance and because we trust the developers, but you can enable checking for these restrictions with the appropriate decorators. It is better to detect a problem during the sitemap build process than during indexing.

The decorators takes the stream to decorate and the sitemap scope as arguments.

License

This bundle is under the MIT license. See the complete license in the file: LICENSE


All versions of sitemap with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-mbstring Version *
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 gpslab/sitemap contains the following files

Loading the files please wait ....