PHP code example of mediashare / crawler
1. Go to this page and download the library: Download mediashare/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/ */
mediashare / crawler example snippets
Mediashare\Crawler\Crawler;
$crawler = new Crawler("https://mediashare.fr");
$crawler->run();
dump($crawler);
Mediashare\Crawler\Crawler;
use Mediashare\Crawler\Config;
$config = new Config();
$config->setWebspider(true); // All website crawling
$config->setVerbose(true); // Prompt progress bar
$config->setPathRequires(['/Kernel/']); // Not crawl other path
$config->setPathExceptions(['/CodeSnippet/']); // Not crawl this path
$crawler = new Crawler("https://mediashare.fr", $config);
$crawler->run();
dump($crawler);