https://github.com/sachinsinghshekhawat/simple-html-dom-parser-php
https://github.com/sachinsinghshekhawat/simple-html-dom-parser-php
html parser php
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sachinsinghshekhawat/simple-html-dom-parser-php
- Owner: sachinsinghshekhawat
- Created: 2018-02-10T13:44:57.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-11T15:31:47.000Z (over 8 years ago)
- Last Synced: 2025-07-24T23:34:17.950Z (11 months ago)
- Topics: html, parser, php
- Language: HTML
- Homepage: https://sachinsingh.me
- Size: 223 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
simple-html-dom-parser-php
---------------------------
Version 1.1.5
Supports PHP >=5.6.32
Adaptation for Composer and PSR-0 of:
Its a HTML dom parser for PHP, you can either process a URL or HTML string, given function will return a DOM object,
which can be used for further processing.
To get DOM object from a URL, use function file_get_html():
```
$dom = HTMLParser::file_get_html("https://google.com");
```
To get DOM object from a string, use function str_get_html():
```
$dom = HTMLParser::str_get_html("");
```
Install
----------------------------------
composer require sachinsinghshekhawat/simple-html-parser-php 1.1.5
Run "composer require sachinsinghshekhawat/simple-html-parser-php 1.1.5" in your project and ready to go. You can
replace last argument with any of the version available.
Usage
------------------------------
```
find('img') as $element)
echo $element->src . '
';
```
------------------------------
For more documentations:
http://simplehtmldom.sourceforge.net/