yangqi/htmldom
Larablocks Analysis
yangqi/htmldom works with any PHP project: the latest release (v1.0.0, Sep 10, 2015) doesn't depend on Laravel.
Recommendation checks
Not advisedNot advised: marked abandoned on Packagist.
- Marked abandoned on Packagist
- No release in the last 12 months (last: Sep 10, 2015)
- 12,099 downloads a month (at least 10,000)
- 89 GitHub stars (needs 100)
State
Abandoned- Packagist marks this package abandoned.
- Last stable release: Sep 10, 2015.
- No releases in the last 12 months.
- First released: Sep 10, 2015.
- Monthly downloads: 12,099.
- 12 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.
| Install | |
|---|---|
composer require yangqi/htmldom |
|
| Latest Version: | v1.0.0 |
| PHP: | >=5.3.0 |
| License: | MIT |
| Last Updated: | Oct 6, 2019 |
| Links: | GitHub · Packagist |
Htmldom
A Htmldom package for Laravel 4 and 5 based on Simple HTML Dom Parser
Installation
Add the following line to the require section of composer.json:
{
"require": {
"yangqi/htmldom": "1.0.*"
}
}
Laravel 5 Setup (same as Laravel 4)
- Add the service provider to
config/app.php.
'providers' => array(
...
'Yangqi\Htmldom\HtmldomServiceProvider',
...
- Add alias to
config/app.php.
'aliases' => array(
...
'Htmldom' => 'Yangqi\Htmldom\Htmldom',
...
Usage
- Use following:
$html = new \Htmldom('http://www.example.com');
// Find all images
foreach($html->find('img') as $element)
echo $element->src . '<br>';
// Find all links
foreach($html->find('a') as $element)
echo $element->href . '<br>';
See the detailed documentation http://simplehtmldom.sourceforge.net/manual.htm
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v1.0.0 | >=5.3.0 | MIT |