Download the PHP package sujanshresthanet/php-xml-sitemap-generator without Composer

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

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require Dependents

PHP Sitemap

PHP XML Sitemap Generator.

Installation via Composer

Add this to composer.json require block.

Getting Started

Create a sitemap object:

Add items to sitemap:

You can add some optional params.

The arguments are loc, priority, changefreq and lastmod. See this table:

Params Required Description
loc required URL of the page. This URL must begin with the protocol (such as http) and end with a trailing slash, if your web server requires it. This value must be less than 2,048 characters.
priority optional The date of last modification of the file. This date should be in W3C Datetime format. This format allows you to omit the time portion, if desired, and use YYYY-MM-DD.
changefreq optional 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.
lastmod optional 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 engines know which pages you deem most important for the crawlers.

See: http://www.sitemaps.org/protocol.html#xmlTagDefinitions

Render it to XML:

This is an example to send it as real sitemap for Google or other search engine:

Output:

Arguments

loc

The URL will be auto escaped. For example, the &, > will convert to &, >.

If you want to escape it yourself, set auto escape off:

See: http://www.sitemaps.org/protocol.html#escaping

changefreq

Valid values are:

The value always should be used to describe documents that change each time they are accessed.

The value never should be used to describe archived URLs.

Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions, they may crawl pages marked hourly less frequently than that, and they may crawl pages marked yearly more frequently than that.

Crawlers may periodically crawl pages marked never so that they can handle unexpected changes to those pages.

priority

The default priority of a page is 0.5. Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index. Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.

lastmod

Your date format will auto convert to W3c Datetime format. for example, if you send a string look like: 2015-06-07 10:51:20, Sitemap object will auto convert it to 2015-06-07T10:51:20+02:00.

This is an example to send it as real sitemap for Google or other search engine:

You can set the format you want:

Using Sitemap index files (to group multiple sitemap files)

Output:

See: http://www.sitemaps.org/protocol.html#index

More


All versions of php-xml-sitemap-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.10
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 sujanshresthanet/php-xml-sitemap-generator contains the following files

Loading the files please wait ....