keltstr/yii2-simplehtmldom

"PHP Simple HTML DOM Parser" rev.210 adapted to Yii2 psr-4(namespace autoload class) based on serhatozles/yii2-simplehtmldom(rev.196)

Installs: 164 586

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 15

Type:yii2-extension

dev-master / 2.210.x-dev 2014-12-23 05:37 UTC

This package is not auto-updated.

Last update: 2024-06-05 01:20:37 UTC


README

"Simple HTML Dom"(PHP Simple HTML DOM Parser) http://simplehtmldom.sourceforge.net/ library rev.210 adapted to yii2 extension class autoload(psr-4 from \vendor\keltstr\simplehtmldom)

Installation

The preferred way to install this extension is through composer. Either run

php composer.phar require --prefer-dist keltstr/yii2-simplehtmldom "dev-master"

or (if composer installed to OS)

composer require --prefer-dist keltstr/yii2-simplehtmldom "dev-master"

OR add(code below) to the require section of your composer.json file and run command Install(Composer)

"keltstr/yii2-simplehtmldom": "dev-master"

Usage

Once the extension is installed, simply use it in your code by :

<?= \keltstr\simplehtmldom\SimpleHTMLDom::file_get_html('http://google.com'); ?>```

OR use alias namespace by use

<?php
use keltstr\simplehtmldom\SimpleHTMLDom as SHD
$html_source = SHD::file_get_html('http://google.com'); 
?>

About the functional read on the official website: http://simplehtmldom.sourceforge.net/