Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 

README.md

PHP Sitemap Generator

What does it can?

  • Create sitemap.xml or sitemap.xml.gz
  • Update sitemap.xml or sitemap.xml.gz
  • Update robots.txt

Usage

$sitemap = new SitemapGenerator\Sitemap;
$sitemap->generate();
Advanced options
/**
 * array['EnableGZip']        boolean 
 * array['UpdateRobots.txt']  boolean 
 * array['RobotsDir']         string 
 * array['SitemapDir']        string 
 * array['SpecifyWebsiteURL'] string 
 */

$options = array(
    'EnableGZip'        => false,                   // Optional: default = false. Allows to enable GZip compressing of a sitemap.xml
    'UpdateRobots.txt'  => true,                    // Optional: default = false.  Allows to enable an updating robots.txt after sitemap generation
    'RobotsDir'         => '/',                     // Optional: default = '/' (root dir). You could specify your path to robots.txt manually
    'SitemapDir'        => '/sitemap/',             // Optional: default = '/' (root dir). You could specify your path to sitemap.xml manually
    'SpecifyWebsiteURL' => 'http://custom-url.com/' // Optional: default = your website URL. You could specify your website's url manually
);

$sitemap = new SitemapGenerator\Sitemap($options);
$sitemap->generate();

About

Create and update sitemap.xml and sitemap.xml.gz

Topics

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.