Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Retrieves, validates, and parses remote sitemap documents

Build Status Software License

Installation

composer require a3020/laravel-sitemap

Usage

Retrieve urls from a single sitemap

$client = $app->make('sitemap.client');
$urls = $client->get(['https://somedomain.com/sitemap.xml']);

Retrieve urls from sitemaps + sitemaps from robots.txt

$client = $app->make('sitemap.client');
$urls = $client->get(['https://somedomain.com/sitemap.xml'], 'https://somedomain.com/robots.txt');

Validate a sitemap

$validator = $app->make('sitemap.validator');
$validator->validate($contents);

Parse a sitemap

$parser = $app->make('sitemap.parser');

// Return URLs found in sitemap document
$parser->urls($contents);

// Filter to only get portfolio URLs.
$parser->filterUrlsByRegexes($contents, ['/portfolio']);

About

Retrieves, validates, and parses remote sitemap documents

Resources

License

Languages

You can’t perform that action at this time.