Download the PHP package zenthangplus/html-dom-parser without Composer

On this page you can find all versions of the php package zenthangplus/html-dom-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package html-dom-parser

HTML DOM parser for PHP

Travis Status CodeShip Status CircleCI

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. You can install by using Composer and import to your project as a package.

Features

Installation

You can use Composer to install this package to your project by running following command:

The minimum PHP version requirement is 5.6. If you are using PHP < 5.6, please use the original version.

Usage

The following example is the simple usage of this package:

DOM

Dom is the root Node of the HTML document.

You can load DOM from string or file.

NODE

Node is simply an HTML element that described as an object.

You can also load any Node (similar to Dom):

Traversing the DOM

By using selectors like jQuery or CSS, you can traverse easy in the Node.

Example:

Similar to Dom, a Node also traversable:

List of supported selectors:
Selector example Description
div Find elements with the div tag
#container Find elements with the container id
.wrapper Find elements with the wrapper class
[data-id] Find elements with the data-id attribute
[data-id=12] Find elements with the attribute data-id=12
a[data-id=12] Find anchor tags with the attribute data-id=12
*[class] Find all elements with class attribute
a, img Find all anchors and images
a[title], img[title] Find all anchors and images with the title attribute
#container ul By using space between selectors, you can find nested elements
#container>ul By using > between selectors, you can find the closest children
#container, #side By using , between selectors, you can find elements by multiple selectors in one query
#container div.content ul>li, #side div[role=main] ul li You can combine selectors in one query
List of function you can use with above selectors:
Specific find functions:
Accessing the node's data:
Modifying the Node's data
Traversing the Node tree

All versions of html-dom-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zenthangplus/html-dom-parser contains the following files

Loading the files please wait ....