PHPackages                             zenthangplus/html-dom-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. zenthangplus/html-dom-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

zenthangplus/html-dom-parser
============================

A Simple HTML DOM parser written in PHP let you manipulate HTML in a easy way with CSS Selector.

1.0.3(7y ago)1216.7k↓33.5%2[3 issues](https://github.com/zenthangplus/HTMLDomParser/issues)MITPHPPHP &gt;=5.6CI failing

Since May 13Pushed 7y ago2 watchersCompare

[ Source](https://github.com/zenthangplus/HTMLDomParser)[ Packagist](https://packagist.org/packages/zenthangplus/html-dom-parser)[ RSS](/packages/zenthangplus-html-dom-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

HTML DOM parser for PHP
=======================

[](#html-dom-parser-for-php)

[![Travis Status](https://camo.githubusercontent.com/d6262d3176344fbd9620ae56cafb85f21d210279829fbb2a19ae0219226c94a0/68747470733a2f2f7472617669732d63692e636f6d2f7a656e7468616e67706c75732f48544d4c446f6d5061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/zenthangplus/HTMLDomParser)[![CodeShip Status](https://camo.githubusercontent.com/59fb9f5cf7e6e289ab7b368193e0f120d1b6e89d0072007626e2b0f5bc417988/68747470733a2f2f6170702e636f6465736869702e636f6d2f70726f6a656374732f30626331326265302d346666352d303133372d333333372d3336616333646138626538352f7374617475733f6272616e63683d6d6173746572)](https://app.codeship.com/projects/339848)[![CircleCI](https://camo.githubusercontent.com/284d8c7e4d7b03d23f6c572572b3964aa4ba4b109fbe1193cfc28986290b6d95/68747470733a2f2f636972636c6563692e636f6d2f67682f7a656e7468616e67706c75732f48544d4c446f6d5061727365722e7376673f7374796c653d737667)](https://circleci.com/gh/zenthangplus/HTMLDomParser)

A Simple HTML DOM parser written in PHP let you manipulate HTML in a easy way with selectors just like CSS or jQuery.

> This is modern version of [Simple HTML DOM](https://simplehtmldom.sourceforge.io/). You can install by using [Composer](https://getcomposer.org/) and import to your project as a package.

### Features

[](#features)

- Parse and modify HTML document.
- Find tags (elements) on HTML with selectors just like jQuery.
- Extract contents from HTML in a single line.
- Export elements or a special node to a single file.
- Supports HTML document with invalid structure.

Installation
------------

[](#installation)

You can use [Composer](https://getcomposer.org/) to install this package to your project by running following command:

```
composer require zenthangplus/html-dom-parser
```

**The minimum PHP version requirement is 5.6**. If you are using PHP &lt; 5.6, please use [the original version](https://simplehtmldom.sourceforge.io/).

Usage
-----

[](#usage)

The following example is the simple usage of this package:

```
