ivebe / sitemap-crawler
Sitemap crawler/generator. For given URL it will return sitemap XML file.
Installs: 1 463
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 5
Open Issues: 0
Requires
- php: >=5.5
This package is not auto-updated.
Last update: 2024-12-25 21:37:56 UTC
README
Sitemap crawler/generator. For given URL it will return sitemap XML file.
Install
composer require ivebe/sitemap-crawler
Example
<?php require_once __DIR__ . '/vendor/autoload.php'; use Ivebe\SitemapCrawler\Crawler; use Ivebe\SitemapCrawler\SitemapService; use Ivebe\SitemapCrawler\LinkCollection; $config = require "src/config.php"; $url = "http://www.google.com"; $crawler = new Crawler($config); $collection = new LinkCollection(); $provider = new SitemapService($crawler, $collection); $links = $provider->crawl($url); $provider->export('monthly');