PHP code example of dr4g0nsr / sitemap-crawler
1. Go to this page and download the library: Download dr4g0nsr/sitemap-crawler 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/ */
dr4g0nsr / sitemap-crawler example snippets
$settings = [
"sleep" => 0,
"excluded" => []
];
e __DIR__ . '/config.php';
use dr4g0nsr\Crawler;
$url = 'https://candymapper.com';
print "Crawler version: " . Crawler::version() . PHP_EOL;
$crawler = new Crawler(['sleep' => 0, 'verbose' => true]);
$crawler->loadConfig(__DIR__ . '/config.php');
$sitemap = $crawler->getSitemap($url);
$crawler->crawlURLS($sitemap);