PHP code example of hugsbrugs / php-html
1. Go to this page and download the library: Download hugsbrugs/php-html 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/ */
hugsbrugs / php-html example snippets
use Hug\Html\Html as Html;
$bool = Html::is_external_link($domain = 'maugey.fr', $link = 'http://maugey.fr/coucou.html');
$bool = Html::is_domain_link($domain = 'tata.maugey.fr', $link = 'http://maugey.fr/coucou.html');
$html = Html::replace_rel_to_abs_paths($html, $page_url = 'http://portail.free.fr/m/');
$html = Html::rel_to_abs($rel = '/js/script.js', $base = 'http://portail.free.fr/m/');
$html = Html::find_backlinks($html, $domain = 'www.free.fr');
$array = Html::get_canonicals($canonical_content = 'index, follow, noindex, noarchive');
$html = Html::set_href_ssl($html);
$html = Html::set_charset_utf_8($html);
$html = Html::remove_external_links($html, $domain = 'free.fr');
$html = Html::remove_script_style($html);
$body = Html::extract_body_content($html);
$is_spa = Html::is_spa($html);
$links = Html::get_links($html);
$links = Html::get_iframes($html);
$external_links = Html::get_external_links($html);
$internal_links = Html::get_internal_links($html);
$images = Html::get_images($html);
$email = Html::DJNikMail($str = '[email protected] ');
phpunit --bootstrap vendor/autoload.php tests