sitemapGenerator
A script for the sitemap generation. The script will create a sitemap with links & images and will compress it., (*1)
Installation
Run the following command :, (*2)
php composer.phar require nidextc/sitemap-generator
or add the following to your composer.json file :, (*3)
"nidextc/sitemap-generator": "dev-master"
SitemapGenerator requires PHP 5.3.0 or later., (*4)
Usage examples
```
<?php, (*5)
require_once 'vendor/autoload.php';
use SeoTools\SitemapGenerator;, (*6)
$sitemapGenerator = new SitemapGenerator('http://www.alexis-ducerf.fr', 50000, date('Y-m-d'), 'monthly');
$sitemapGenerator->generate();
$sitemapGenerator->compress();, (*7)
````, (*8)
| Parameters |
Detail |
| http://www.alexis-ducerf.fr |
the absolute URL of the website |
| 50000 |
The max number of pages crawled (50000 is the limit for Google) |
| date('Y-m-d') |
If the server don't send the last modification date, set it as default |
| monthly |
The pages modification frequency |
Enjoy !