PHP code example of divineomega / web-article-formatter

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

    

divineomega / web-article-formatter example snippets


$formatter = new WebArticleFormatter($url);

echo $formatter->get(Format::PLAINTEXT);
echo $formatter->get(Format::MARKDOWN);
echo $formatter->get(Format::HTML);
echo $formatter->get(Format::JSON);

file_put_contents('article.pdf', $formatter->get(Format::PDF));