chuoke/uri-meta

Get URI META

Maintainers

👁 chuoke

Package info

github.com/chuoke/uri-meta

pkg:composer/chuoke/uri-meta

Fund package maintenance!

chuoke

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.4 2021-09-28 02:11 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 9d5fc5a9226cb6e94dfaff910c5245c9ad3e578e

  • chuoke <chuokechungyoung.woop@gmail.com>

uri meta

This package is auto-updated.

Last update: 2026-06-05 01:33:20 UTC


README

👁 Latest Version on Packagist
👁 GitHub Tests Action Status
👁 GitHub Code Style Action Status
👁 Total Downloads

This package can be used as to extract the META information of the URI.

Installation

You can install the package via composer:

composer require chuoke/uri-meta

Usage

 $extracter = new UriMetaExtracter();

 $uriMeta = $extracter->extract('https://www.php.net/');

 echo $uriMeta->title(); // PHP: Hypertext Preprocessor

 print_r($uriMeta->toArray());
 // Array
 // (
 // [uri] => https://www.php.net/
 // [host] => www.php.net
 // [scheme] => https
 // [title] => PHP: Hypertext Preprocessor
 // [description] => https://www.php.net/
 // [keywords] =>
 // [icons] => Array
 // (
 // [0] => https://www.php.net/favicon.ico
 // )

 // )

 $uriMeta = $extracter->extract('https://github.com/php/php-src');

 print_r($uriMeta->toArray());
 // Array
 // (
 // [uri] => https://github.com/php/php-src
 // [host] => github.com
 // [scheme] => https
 // [title] => GitHub - php/php-src: The PHP Interpreter
 // [description] => The PHP Interpreter. Contribute to php/php-src development by creating an account on GitHub.
 // [keywords] =>
 // [icons] => Array
 // (
 // [0] => https://github.githubassets.com/favicons/favicon.svg
 // [1] => https://github.githubassets.com/pinned-octocat.svg
 // [2] => https://github.com/favicon.ico
 // )
 // )

License

The MIT License (MIT). Please see License File for more information.