PHP code example of bootpress / sitemap

1. Go to this page and download the library: Download bootpress/sitemap 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/ */

    

bootpress / sitemap example snippets

 php


use BootPress\Page\Component as Page;
use BootPress\Sitemap\Component as Sitemap;

$page = Page::html();

if ($xml = Sitemap::page()) {
    $page->send($xml);
}

$html = '<p>Content</p>';

Sitemap::add('pages', $html);

$page->send($page->display($html));