alc/sitemap-crawler

Crawl sitemap.xml recursively and return collected urls as array

v2.0.0 2021-04-26 16:31 UTC

This package is auto-updated.

Last update: 2024-10-27 00:18:09 UTC


README

Crawl sitemap.xml recursively and return collected urls as array

Install

composer require alc/sitemap-crawler

Usage

require __DIR__.'/vendor/autoload.php';

use Alc\SitemapCrawler;

$crawler = new SitemapCrawler();

$data = $crawler->crawl('https://chemel.blog/sitemap.xml');

print_r($data);

Usage in a terminal:

php crawl.php https://chemel.blog/sitemap.xml