PHP code example of kemel91 / html-parser
1. Go to this page and download the library: Download kemel91/html-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/ */
kemel91 / html-parser example snippets
$url = 'https://www.w3schools.com/html/';
$urlParser = new \Kemel91\HtmlParser\UrlParser($url);
$tags = $urlParser->parse()->tags();
$tagsCount = $tags->count();
$tagsUnique = $tags->unique();
$tagsAll = $tags->all();
$tagsGroup = $tags->groupInKeys();
$request = new \Request('METHOD', 'https://www.w3schools.com/html/');
$client = new \Client();
$urlParser = new \Kemel91\HtmlParser\UrlParser($request, $client);