jjok / xml-sitemap
Generate an XML sitemap.
1.1.0
2014-03-17 14:55 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-21 16:20:42 UTC
README
Generate an XML sitemap.
$sitemap = new \jjok\XmlSitemap\Sitemap();
$sitemap->addUrl(new \jjok\XmlSitemap\Url('http://www.example.com/'));
$sitemap->addUrl(new \jjok\XmlSitemap\Url('http://www.example.com/some-page', 0.6, '2013-06-28', 'hourly'));
header('Content-type: application/xml; charset=utf-8');
echo $sitemap->toString();
Run Tests
phpunit
Copyright (c) 2013 Jonathan Jefferies