1. Go to this page and download the library: Download w3zone/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/ */
w3zone / crawler example snippets
use w3zone\Crawler\{Crawler, Services\phpCurl};
$crawler = new Crawler(new phpCurl);
$link = 'http://www.example.com';
// return an array [statusCode, body, headers, cookies]
// get method may contain link string or an array [url, query string]
$homePage = $crawler->get($link)->dumpHeaders()->run();
$response = $crawler->get($link)->dumpHeaders()->cookies($homePage['cookies'], 'r+w')->run();