PHPackages                             hstanleycrow/easyphparticleextractor - 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. hstanleycrow/easyphparticleextractor

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

hstanleycrow/easyphparticleextractor
====================================

Free PHP library to extract the main content from an article post or news post, including images and HTML

1202PHP

Since May 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/hstanleycrow/EasyPHPArticleExtractor)[ Packagist](https://packagist.org/packages/hstanleycrow/easyphparticleextractor)[ RSS](/packages/hstanleycrow-easyphparticleextractor/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

 Easy PHP Article Extractor

===============================

[](#-----easy-php-article-extractor--)

This is a post article and news posts extractor library for PHP. This library detects where is the content in the HTML and reads the article content from the page, keeping all the useful HTML, suitable for translate and publish in other languages.

You can extract only the text too. The library can remove all the internal links to avoid those links into the content. It process the images too to remove the links. Talking about images, the library extract the images in all the HTML tags supported and ways to add one image into the content of the posts.

The library detects Youtube videos too to inject the URL of the video in the right place of the content, avoiding the manual action for this, and do the same with inserted Tweets.

For a project I have developed, I found many existing open source solutions, but each had unique failures for my project. You can use this libray with another library of mine for translate using the Google Translator API: [EasyPHPGoogleTranslate](https://github.com/hstanleycrow/EasyPHPGoogleTranslate).

Another use for this library is combinating it with another of my libraries that publish content from PHP to Wordpress: [EasyPHPToWordpress](https://github.com/hstanleycrow/EasyPHPToWordpress). In that way, you can extract, translate and publish to Wordpress. I have developed another library: [EasyPHPOpenAI](https://github.com/hstanleycrow/EasyPHPOpenAI), where you can use it to use OpenAI API into the content extracted.

#### Free PHP library to extract the main content from an article post or news post, including images and HTML

[](#free-php-library-to-extract-the-main-content-from-an-article-post-or-news-post-including-images-and-html)

 [How To Use](#how-to-use) • [Download](#download) • [License](#license)

How To Use
----------

[](#how-to-use)

```
# Clone this repository
$ git clone https://github.com/hstanleycrow/EasyPHPArticleExtractor/

# install libraries
$ composer update
```

or

```
# Install using composer
$ composer require hstanleycrow/easyphparticleextractor

### Using Examples
You only need to create an instance of the main class with the URL with the content to extract and you will to obtain the content with the HTML, in plain text and the title of the article.
PD: I use the library to extract the content with HTML, so the plain text is not my priority. In the other hand, the detection of the main content is very hard, so, sometimes it can extract weird content with the main post, but this library was developed to use the extracted content with an text editor, so, extract some garbage is not a problem for me, because in the editor the user can clean the content.

```php
$url = 'https://nftplazas.com/zed-run-airdrop/';
$articleExtractor = new ArticleExtractor($url);
$article = $articleExtractor->article();
$title = $articleExtractor->title();
$plaintext = $articleExtractor->plainText();

$url = 'https://www.seroundtable.com/google-search-algorithm-ranking-volatility-35414.html';
$article = $articleExtractor->article();
echo $articleExtractor->title() . PHP_EO

```

Download
--------

[](#download)

You can [download](https://github.com/hstanleycrow/EasyPHPArticleExtractor/) the latest version here.

PHP Versions
------------

[](#php-versions)

I have tested this class only in this PHP versions. So, if you have an older version and do not work, let me know.

PHP VersionPHP 8.0PHP 8.1PHP 8.2Support
-------

[](#support)

[![Buy Me A Coffee](https://camo.githubusercontent.com/b32d80c4bde7464703f7dcbb8dd24902a7b2de6b0f52a872563f87293d4eb87a/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f707572706c655f696d672e706e67)](https://www.buymeacoffee.com/haroldcrow)

License
-------

[](#license)

MIT

---

> [www.hablemosdeseo.net](https://www.hablemosdeseo.net) · GitHub [@hstanleycrow](https://github.com/hstanleycrow) · Twitter [@harold\_crow](https://twitter.com/harold_crow)

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/713da77764977a76a357f6b34361a7ab51bd55ea847b84112e3a38f5496af173?d=identicon)[hstanleycrow](/maintainers/hstanleycrow)

---

Top Contributors

[![hstanleycrow](https://avatars.githubusercontent.com/u/7930763?v=4)](https://github.com/hstanleycrow "hstanleycrow (3 commits)")

---

Tags

extract-articleextract-contentextract-textextract-websiteextractionextractorphpphp-librarywebsite

### Embed Badge

![Health badge](/badges/hstanleycrow-easyphparticleextractor/health.svg)

```
[![Health](https://phpackages.com/badges/hstanleycrow-easyphparticleextractor/health.svg)](https://phpackages.com/packages/hstanleycrow-easyphparticleextractor)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[karriere/json-decoder

JsonDecoder implementation that allows you to convert your JSON data into PHP class objects

140439.4k12](/packages/karriere-json-decoder)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46143.1k6](/packages/jstewmc-rtf)[json-mapper/laravel-package

The JsonMapper package for Laravel

25188.9k3](/packages/json-mapper-laravel-package)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)

PHPackages © 2026

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