PHP code example of daa / web-scraping-sdk
1. Go to this page and download the library: Download daa/web-scraping-sdk 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/ */
daa / web-scraping-sdk example snippets
$scraper = new Your\Package\Scraper\YourScraper('http://www.someurl.com/with/content/');
$scraper->execute();
$pages = array(
'http://www.someurl.com/section-one/',
'http://www.someurl.com/section-two/page1',
'http://www.someurl.com/section-one/page2'
);
$scraper = new Your\Package\Scraper\YourScraper();
foreach ($pages as $url) {
$scraper->setSource($url);
$scraper->execute();
}