PHPackages                             seosazi/php-html-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. seosazi/php-html-parser

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

seosazi/php-html-parser
=======================

simple crawl link and parser it

1.2.11(4y ago)2541[1 issues](https://github.com/PouyaPour/php-html-parser/issues)MITPHPPHP &gt;=7.2.0

Since Aug 23Pushed 4y ago3 watchersCompare

[ Source](https://github.com/PouyaPour/php-html-parser)[ Packagist](https://packagist.org/packages/seosazi/php-html-parser)[ Docs](https://github.com/seosazi)[ RSS](/packages/seosazi-php-html-parser/feed)WikiDiscussions master Synced 1w ago

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

[![Build Status](https://camo.githubusercontent.com/9e55f9c5929f94ca923556dec90fe17773125cc36f11148aebf0a6e687db6459/68747470733a2f2f7472617669732d63692e636f6d2f73656f73617a692f7068702d68746d6c2d7061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/seosazi/php-html-parser)

Fast and Convenient PHP WebPage and Html Parser
===============================================

[](#fast-and-convenient-php-webpage-and-html-parser)

PHPHtmlParser is a fast, convenient, and simple page parser which allows you to use any data of page, such as header, redirects, code status, variant meta tag, H tags, image attributes, links and so on. The goal is to assist you that parse different pages without any problem and use categorized data in your programs.

Let's get started ...

Installing PHP Html Parser
--------------------------

[](#installing-php-html-parser)

This package can be found on packagist and is best loaded using composer. We support php 5.0, 7.0. The recommended way to install Php-Html-Parser is through [Composer](https://getcomposer.org/).

**composer.phar**

```
 "require": {
    "seosazi/php-html-parser": "^1.0"
}

```

or

```
 composer require seosazi/php-html-parser

```

Usage
-----

[](#usage)

Using this class is simple and it is enough to put your page address to get different information of it. The following example is a very simplistic usage of the package.

```
// Assuming you installed from Composer:
use PHPHtmlParser\Crawl\WebPageProcessor;
require_once '/vendor/autoload.php';
$data = WebPageProcessor::onePageProcessed('https://www.your-website.com');
var_dump($data->getH1Tag());//get array of H1 tag
var_dump($data->getExternalLinks());//get array of all external link (Url class)
var_dump($data->getImageAlt());//get array of all image address and alt tag of them
var_dump($data->getHeader());//get array of header parameters
```

Full list of WebPageProcessor parameters
----------------------------------------

[](#full-list-of-webpageprocessor-parameters)

ParameterDescriptiongetUrlInfoGet information about your [Url](#url-class), for example home address, last url after possible redirects and first urlgetHtmlGet page htmlgetUrlGet the url that you enteredgetStatusGet the status code of your address, if the code is more than 600 it means that this address is inaccessiblegetHeaderGet an array of all header parameters, including Connection, Cache-Control, Set-Cookie, Vary, Content-Type, Transfer-Encoding, Date, Server, Alt-Svc, x-encoded-content-encoding, Keep-Alive, P3P, and so on.getUrlBeforeRedirectGet the url before redirectinggetRedirectGet an array of all possible redirects, including header parameter, status code, urlgetBaseTagGet base taggetHeaderContentTypeGet url content typegetBodyTextGet text in body taggetTitleGet page titlegetKeywordsGet the meta keywords taggetDescriptionGet the meta description taggetCanonicalGet a canonical taggetPTagGet an array of all p taggetSpanTagGet an array of all span taggetH1TagGet an array of all H1 taggetH2TagGet an array of all H2 taggetH3TagGet an array of all H3 taggetH4TagGet an array of all H4 taggetH5TagGet an array of all H5 taggetH6TagGet an array of all H6 taggetLiElementGet an array of all Li elementgetImageAltGet an array of all image address with alt taggetAnchorTagGet an array of all anchor textgetLinksGet an array of all links. for better use of link, the [Url](#url-class) class was created for easy use with the url. more informationgetInternalLinksGet an array of all internal links. for better use of link, the [Url](#url-class) class was created for easy use with the url. more informationgetExternalLinksGet an array of all external links. for better use of link, the [Url](#url-class) class was created for easy use with the url. more informationgetEntireDataGet an array of all dataUrl Class
---------

[](#url-class)

We created the Url class to increase the quality and speed of using URLs. You can use this very simple.

```
$data->getUrlInfo()->getUrl();
// if anchor text exists
$data->getUrlInfo()->getAnchorText();
$data->getUrlInfo()->getFabricUrl();
$data->getUrlInfo()->getHomeAddress();
// if parent exists
$data->getUrlInfo()->getParent();
//get all information in array
$data->getUrlInfo()->getUrlInfoArray();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~121 days

Total

19

Last Release

1588d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.5.0

v1.1.6PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fca00710a6861764deb84b385f7ee6e91759ede1a6bc89e400a11689b12c3ac1?d=identicon)[seosazi](/maintainers/seosazi)

---

Top Contributors

[![PouyaPour](https://avatars.githubusercontent.com/u/28677731?v=4)](https://github.com/PouyaPour "PouyaPour (37 commits)")

---

Tags

phpparserhtmlcrawlerweb page

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seosazi-php-html-parser/health.svg)

```
[![Health](https://phpackages.com/badges/seosazi-php-html-parser/health.svg)](https://phpackages.com/packages/seosazi-php-html-parser)
```

###  Alternatives

[simplehtmldom/simplehtmldom

A fast, simple and reliable HTML document parser for PHP.

1921.3M14](/packages/simplehtmldom-simplehtmldom)[ressio/pharse

Fastest PHP HTML Parser

8478.4k](/packages/ressio-pharse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
