PHPackages                             dotsunited/embed-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. dotsunited/embed-parser

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

dotsunited/embed-parser
=======================

Simple utility to parse URLs in HTML or text content which are placed on its own line to turn them into embeds.

v0.4.0(9y ago)024MITPHPPHP &gt;=5.6.0

Since May 16Pushed 8y ago6 watchersCompare

[ Source](https://github.com/dotsunited/embed-parser)[ Packagist](https://packagist.org/packages/dotsunited/embed-parser)[ Docs](https://github.com/dotsunited/embed-parser)[ RSS](/packages/dotsunited-embed-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

Embed Parser
============

[](#embed-parser)

Simple utility to parse URLs in HTML or text content which are placed on its own line to turn them into embeds.

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

[](#installation)

Install the latest version with [Composer](https://getcomposer.org).

```
composer require dotsunited/embed-parser
```

Check the [Packagist page](https://packagist.org/packages/dotsunited/embed-parser)for all available versions.

Usage
-----

[](#usage)

There is single `parse` function provided which parses the given content and invokes a handler callback for each URL found.

```
$transformedContent = DotsUnited\EmbedParser\parse($content, function ($url) {
    $embedHtml = tranformUrlToEmbedHtml($url);

    return $embedHtml;
});
```

The URL must be on its own line or surrounded only by `` tags with no other text content to be parsed.

### Text

[](#text)

```
Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore
magna aliquyam erat, sed diam voluptua.

https://youtube.com/watch?v=QcIy9NiNbmo

At vero eos et accusam et justo duo dolores et ea rebum.

```

### HTML

[](#html)

```

    Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
    sed diam nonumy eirmod tempor invidunt ut labore et dolore
    magna aliquyam erat, sed diam voluptua.

    https://youtube.com/watch?v=QcIy9NiNbmo

    At vero eos et accusam et justo duo dolores et ea rebum.

```

License
-------

[](#license)

Copyright (c) 2017 Dots United GmbH. Released under the [MIT](LICENSE) license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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 ~0 days

Total

4

Last Release

3285d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de14776bbddf901c6e24d35829fe66fe997c303d53aca83cc7d1a90bb0b7110?d=identicon)[jsor](/maintainers/jsor)

---

Top Contributors

[![jsor](https://avatars.githubusercontent.com/u/55574?v=4)](https://github.com/jsor "jsor (10 commits)")

---

Tags

parserhtmlembedoembed

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dotsunited-embed-parser/health.svg)

```
[![Health](https://phpackages.com/badges/dotsunited-embed-parser/health.svg)](https://phpackages.com/packages/dotsunited-embed-parser)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[paquettg/php-html-parser

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

2.4k7.9M123](/packages/paquettg-php-html-parser)[sunra/php-simple-html-dom-parser

Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.

1.3k9.4M61](/packages/sunra-php-simple-html-dom-parser)[imangazaliev/didom

Simple and fast HTML parser

2.2k2.3M64](/packages/imangazaliev-didom)[simplehtmldom/simplehtmldom

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

1921.3M14](/packages/simplehtmldom-simplehtmldom)[scotteh/php-dom-wrapper

Simple DOM wrapper to select nodes using either CSS or XPath expressions and manipulate results quickly and easily.

1471.9M10](/packages/scotteh-php-dom-wrapper)

PHPackages © 2026

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