PHP code example of siteorigin / laravel-kernel-crawler
1. Go to this page and download the library: Download siteorigin/laravel-kernel-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/ */
siteorigin / laravel-kernel-crawler example snippets
use SiteOrigin\KernelCrawler\Crawler;
use SiteOrigin\KernelCrawler\Exchange;
$crawler = new Crawler();
$crawler->each(function(Exchange $ex){
// $ex->request is an Illuminate\Http\Request object
$ex->request->url();
// $ex->response is an Illuminate\Http\Response object
$ex->response->getContent()
});