PHP code example of fayyaztech / sitemap-generator
1. Go to this page and download the library: Download fayyaztech/sitemap-generator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fayyaztech / sitemap-generator example snippets
use Fayyaztech\SitemapGenerator\SitemapGenerator;
// Instantiate the generator
$sitemapGenerator = new SitemapGenerator();
// Generate XML sitemap
$sitemapGenerator->generateXmlSitemap('/path/to/output');
// Generate ROR sitemap
$sitemapGenerator->generateRorSitemap('/path/to/output');
// Generate HTML sitemap
$sitemapGenerator->generateHtmlSitemap('/path/to/output');
// Generate URLLIST
$sitemapGenerator->generateUrlList('/path/to/output');