PHPackages                             731my/php-meta-tags - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. 731my/php-meta-tags

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

731my/php-meta-tags
===================

A PHP library to fetch meta tags from html content

113PHP

Since Jun 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/731MY/php-meta-tags)[ Packagist](https://packagist.org/packages/731my/php-meta-tags)[ RSS](/packages/731my-php-meta-tags/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Meta Tags
=============

[](#php-meta-tags)

PHP library to extract meta tags from html contents

requirement
-----------

[](#requirement)

- php &gt;= 7.0.0
- CURL

Install
-------

[](#install)

```
composer require 731my/php-meta-tags

```

Usage:
------

[](#usage)

#### Simple use

[](#simple-use)

```
$Reader = new Reader('https://www.bbc.com/news/uk-england-44520759');

$Meta = new MetaFetcher($Reader);

print_r($Meta->meta());
```

#### Filter specific tags

[](#filter-specific-tags)

```
$Reader = new Reader('https://www.bbc.com/news/uk-england-44520759');

$Meta = new MetaFetcher($Reader);

print_r($Meta->meta(['og:image']));
```

#### Load from file

[](#load-from-file)

```
$Reader = new Reader('/tmp/file.html', Type::FILE);

$Meta = new MetaFetcher($Reader);
```

#### Load from data

[](#load-from-data)

```
$Reader = new Reader("....", Type::DATA);

$Meta = new MetaFetcher($Reader);
```

#### Config

[](#config)

you can customize user-agent , timeout , referer

```
$Config = new Config();

$Config->setTimeout(20); // in seconds , default: 10
$Config->setUserAgent('731MY'); // default: Googlebot/2.1 (+http://www.google.com/bot.html)
$Config->setReferer('https://google.com/'); // default: null

$Meta = new MetaFetcher(new Reader('https://www.bbc.com/news/uk-england-44520759',Type::URL,$Config));
```

License
-------

[](#license)

```
MIT License

Copyright (c) 2016 Helmy Al Dobhany

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/83bd880345697d0063a8867856d2d83c047a3d1def698c19a734e5d9ba49fbec?d=identicon)[731MY](/maintainers/731MY)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/731my-php-meta-tags/health.svg)

```
[![Health](https://phpackages.com/badges/731my-php-meta-tags/health.svg)](https://phpackages.com/packages/731my-php-meta-tags)
```

###  Alternatives

[amstaffix/pagination

Simple pagination

46290.4k6](/packages/amstaffix-pagination)[faonni/module-smart-category

SmartCategory module is a base of Smart Categories functionality.

8289.3k3](/packages/faonni-module-smart-category)[sitegeist/silhouettes

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

16157.5k](/packages/sitegeist-silhouettes)[chevere/throwable-handler

Throwable handler for multiple contexts

1131.9k9](/packages/chevere-throwable-handler)[michaeljennings/refinery

A php class to refine data into a set format.

129.5k2](/packages/michaeljennings-refinery)

PHPackages © 2026

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