1. Go to this page and download the library: Download tekintian/html-cleaner 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/ */
tekintian / html-cleaner example snippets
use tekintian\HtmlCleaner\HtmlCleaner;
// Clean HTML string
$dirtyHtml = '<p style="color: red;">Content</p>';
$cleanHtml = HtmlCleaner::clean($dirtyHtml);
// Clean HTML file
$cleanedHtml = HtmlCleaner::cleanFile('input.html', 'output.html');