PHPackages                             piradoiv/linklord - 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. piradoiv/linklord

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

piradoiv/linklord
=================

A micro library to extract link's information from an HTML string

1.0.0(13y ago)360MITPHPPHP &gt;=5.4.0

Since Jun 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/piradoiv/html-linklord)[ Packagist](https://packagist.org/packages/piradoiv/linklord)[ RSS](/packages/piradoiv-linklord/feed)WikiDiscussions master Synced 4w ago

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

LinkLord
========

[](#linklord)

[![Build Status](https://camo.githubusercontent.com/2d93dcc934d67873ab2d5b401d3c6d1bd006950d382ed242767328ba00879b76/68747470733a2f2f7472617669732d63692e6f72672f70697261646f69762f68746d6c2d6c696e6b6c6f72642e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/piradoiv/html-linklord)

PHP Micro library to extract links from an HTML string.

How to install
--------------

[](#how-to-install)

The easiest way to install the library is using [Composer](http://getcomposer.org/).

```
{
  "require": {
    "piradoiv/linklord": "1.*"
  }
}
```

Please notice the library requires at least PHP 5.3 in order to work (tested on **5.3.26** and **5.4.16**)

How to use it
-------------

[](#how-to-use-it)

```
# Require Composer autoloader
require 'vendor/autoload.php';

$html = 'Example';
$parser = new \PiradoIV\Html\LinkLord\Parser($html);
$links = $parser->getLinks();

foreach ($links as $node) {
  echo "{$node->anchorText}\n";
}
```

Other features
--------------

[](#other-features)

**Follow/Nofollow**

LinkLord is able to know whether the links are followed or not.

```
$node->isNoFollow;
```

**What about images?**

If the link has an image child, it will be detected.

```
$node->isImage;
```

**Mentions**

Looking for mentions on the code?, LinkLord is able to recognise mentions on the text, this means if there is a '[www.example.com](http://www.example.com)' on the text **and** is not linked, this will count as a mention.

```
$possibleMentions = array('www.example.com', 'www.anotherdomain.com');
$mentions = $parser->getMentions($possibleMentions);
```

Contact me
----------

[](#contact-me)

If you need more examples or help, please contact me on Twitter, [@PiradoIV](http://twitter.com/PiradoIV/) :)

Enjoy! :)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

4753d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95dc591db74b99ddb99ec65ad393c2f692a3a96ef1cccb9dc45a87d535800386?d=identicon)[piradoiv](/maintainers/piradoiv)

---

Top Contributors

[![piradoiv](https://avatars.githubusercontent.com/u/601856?v=4)](https://github.com/piradoiv "piradoiv (123 commits)")

### Embed Badge

![Health badge](/badges/piradoiv-linklord/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.0M322](/packages/drupal-core-dev)[drupal/drupal-extension

Drupal extension for Behat

21115.5M166](/packages/drupal-drupal-extension)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[sproutcms/cms

Enterprise content management and framework

242.2k4](/packages/sproutcms-cms)

PHPackages © 2026

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