PHP code example of manishgs / scraper

1. Go to this page and download the library: Download manishgs/scraper 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/ */

    

manishgs / scraper example snippets


use Scraper\Grab;

// create new Grab 
$grab = new Grab();

// set Url    
$grab = $grab->setUrl('http://google.com');

// extract data
$article = $grab->getInfo();

print_r($article);