PHP code example of sohib / crawler
1. Go to this page and download the library: Download sohib/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/ */
sohib / crawler example snippets
php
use Sohib\Crawler;
$urls = [
"http://thatsthefinger.com/",
"http://just-shower-thoughts.tumblr.com/",
"http://ducksarethebest.com/",
];
$crowler = new Crawler\Scanner($urls);
$scanner = $crowler->scan();
var_dump($scanner->toArray()); // return urls as array
var_dump($scanner->toJson()); // return urls as json
var_dump($scanner->toXml()); // return urls as Xml