Recommend this page to a friend! |
![]() |
Info | Example | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
![]() ![]() ![]() ![]() | Total: 488 | All time: 5,894 This week: 488![]() |
Version | License | PHP version | Categories | |||
voku-simple_html_dom 2.0.78 | MIT/X Consortium ... | 5.3 | HTML, PHP 5, Parsers |
Collaborate with this project | Authors Contributor | |
simple_html_dom - github.com Description This class can manipulate HTML elements using DOMDocument |
<?php |
A HTML DOM parser written in PHP - let you manipulate HTML in a very easy way! This is a fork of PHP Simple HTML DOM Parser project but instead of string manipulation we use DOMDocument and modern php classes like "Symfony CssSelector".
composer require voku/simple_html_dom
composer require voku/portable-utf8 # if you need e.g. UTF-8 fixed output
use voku\helper\HtmlDomParser;
require_once 'composer/autoload.php';
...
$dom = HtmlDomParser::str_get_html($str);
// or
$dom = HtmlDomParser::file_get_html($file);
$element = $dom->findOne('#css-selector'); // "$element" === instance of "SimpleHtmlDomInterface"
$elements = $dom->findMulti('.css-selector'); // "$elements" === instance of SimpleHtmlDomNodeInterface<int, SimpleHtmlDomInterface>
$elementOrFalse = $dom->findOneOrFalse('#css-selector'); // "$elementOrFalse" === instance of "SimpleHtmlDomInterface" or false
$elementsOrFalse = $dom->findMultiOrFalse('.css-selector'); // "$elementsOrFalse" === instance of SimpleHtmlDomNodeInterface<int, SimpleHtmlDomInterface> or false
...
github.com/voku/simple_html_dom/tree/master/example
github.com/voku/simple_html_dom/tree/master/README_API.md
For support and donations please visit Github | Issues | PayPal | Patreon.
For status updates and release announcements please visit Releases | Twitter | Patreon.
For professional support please contact me.
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Example | Example script | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | .github |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data |
![]() |
/ | build |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source |
![]() |
/ | example |
File | Role | Description |
---|---|---|
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() ![]() |
Example | Example script |
![]() |
/ | src | / | voku | / | helper |
![]() |
/ | tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
Class | Class source | ||
![]() ![]() |
Aux. | Auxiliary script | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | tests | / | fixtures |
File | Role | Description |
---|---|---|
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Doc. | Documentation |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Example | Example script |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
![]() | voku-simple_html_dom-2023-02-12.zip 286KB |
![]() | voku-simple_html_dom-2023-02-12.tar.gz 249KB |
![]() | Install with Composer |
Needed packages | ||
Class | Download | Why it is needed | Dependency |
---|---|---|---|
Portable UTF-8 | ![]() |
Strin | Required |
Version Control | Reuses | Unique User Downloads | Download Rankings | ||||||||||||||||
100% | 4 |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Other classes that need this package |
Class | Why it is needed | Dependency |
---|---|---|
PHP CSS to Inline Styles | Dom-Manipulation | Required |
PHP HTML Form Validator | HTML-Dom interactions | Required |
PHP HTML Minify Class | Dom-Parsing | Required |
PHP httpful Request | auto-parsing html output | Required |