PHP code example of netflex / scraper

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

    

netflex / scraper example snippets




use Scraper;

$metadata = Scraper::scrape('https://example.com');

echo $metadata->site;        // "example.com"
echo $metadata->title;       // "Example Domain"
echo $metadata->description; // "This domain is for use in illustrative examples in documents. You may use this    domain in literature without prior coordination or asking for permission."
echo $metadata->canonical;   // "https:\/\/example.com"



use Netflex\Scraper\Scraper;

$scraper = new Scraper();

$metadata = $scraper->scrape('https://example.com');