PHP code example of deepslam / content-parser

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

    

deepslam / content-parser example snippets


...
Deepslam\ContentParser\ContentParserServiceProvider::class,
...

'ContentParser' => Deepslam\ContentParser\ContentParser::class,

$parser = ContentParser::create();

$parser = ContentParser::create('mercury');

$parser->parse($url)

$parser = ContentParser::create('<your alias of parser>');

        $parser = ContentParser::create('<parser which you need>');
        $parser->parse('<url to grab>');
        $result = $parser->getResult();
        <your_model>->name = $result->getTitle();
        <your_model>->description = $result->getContent();
console
php artisan vendor:publish --provider="Deepslam\ContentParser\ContentParserServiceProvider"